2019-08-27 python-split

2019-08-27  本文已影响0人  XHSong

Example: split() command

%reset
y = "abc $45 81"
print(y.split()) # Delimiter is whitespace

y = "abc,fgh,81"
print(y.split(",")) # Delimiter is coma
print(y)

y = "5454-8070-1234"
print(y.split("-"))  # Delimiter is dash
上一篇 下一篇

猜你喜欢

热点阅读