例:1:
filt函数用法及匿名函数lamda用法,详见http://www.cnblogs.com/apple2016/p/5657698.html
join()用法详见http://www.cnblogs.com/apple2016/p/5600977.html
ss=['upay3 27878 1 * ?']
s1=','.join(filter(lambda x: x, ss[0].split(' ')))
print (s1)
>>> ================================ RESTART ================================
>>>
upay3,27878,1,*,?
例如2:
ss=['upay3 27878 1 * ?']
s=','.join(filter(lambda x: x, ss[0].split(' '))).split(',')[1]
print (s)
>>> ================================ RESTART ================================
>>>
27878