Lanyue 参考文章
清空列表中的多项空值:
test = ['a','','b','','c','',''] test = [i for i in test if i != ''] print(test)
输出结果为:
['a', 'b', 'c']