‘,‘.join(filter(lambda x: x, a.split(‘ ‘)))
ss=[‘upay3 27878 1 * ?‘] s1=‘,‘.join(filter(lambda x: x, ss[0].split(‘ ‘))) print (s1)
>>> ================================ RESTART ================================ >>> upay3,27878,1,*,?
原文:http://www.cnblogs.com/beckham-7/p/6429015.html