## split后列表有''等' '值 ,去除掉 a=['a','',' ',False,'0','b',0,'false'] b=[i for i in a if str(i).strip()] print(b)
结果['a', False, '0', 'b', 0, 'false']
## split后列表有''等' '值 ,去除掉 a=['a','',' ',False,'0','b',0,'false'] b=[i for i in a if str(i).strip()] print(b)
结果['a', False, '0', 'b', 0, 'false']