str = "this is string example....wow!!!"
print(str.split())
print(str.split(' '))
print(str.split('i',1))
print(str.split('w'))
结果:
['this', 'is', 'string', 'example....wow!!!']
['this', '', 'is', '', 'string', 'example....wow!!!']
['th', 's is string example....wow!!!']
['this is string example....', 'o', '!!!']
网友评论