Python(7-2)字符串操作——split()方法

分割字符方法

str = "this is string example....wow!!!"
print (str.split( ))
print (str.split('i',1))
print (str.split('w'))
>>> 
['this', 'is', 'string', 'example....wow!!!']
['th', 's is string example....wow!!!']
['this is string example....', 'o', '!!!']
Last modification:November 30th, 2018 at 08:46 pm
If you think my article is useful to you, please feel free to appreciate

Leave a Comment