美文网首页
2019-08-27 python-split

2019-08-27 python-split

作者: XHSong | 来源:发表于2019-08-27 16:23 被阅读0次

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

相关文章

网友评论

      本文标题:2019-08-27 python-split

      本文链接:https://www.haomeiwen.com/subject/luseectx.html