python删除列表中所有的空元素

 

while '' in list:
    list.remove('')

 

posted @ 2018-10-15 18:20  Operater  阅读(3677)  评论(1编辑  收藏  举报