列表遍历

lstTmp = ["1","2","3",""]
lstTmp = [x for x in lstTmp if x != '']
print(lstTmp)

 

posted @ 2021-03-08 20:24  countryboy666  阅读(64)  评论(0编辑  收藏  举报