标签:ret int end import split bsp ext lambda xtend
1.
def MySplit(x,ds):
res = [x]
for d in ds:
t = []
map(lambda x: t.extend(x.split(d)),res)
res = t
return (x for x in res if x)
x = "ads,ds;sd?dsds\tsd|e"
print (res)
2.
import re
re.split(‘[,;\t?|]+‘,x)
标签:ret int end import split bsp ext lambda xtend
原文地址:http://www.cnblogs.com/lidam/p/6945375.html