摘要: list(filter(None, list1)) list1 = ['122', '2333', '3444', '', '', None] a = list(filter(None, list1)) # 只能过滤空字符和None print(a) # ['122', '2333', '3444' 阅读全文
posted @ 2020-07-01 02:51 JIMfan 阅读(2975) 评论(0) 推荐(1) 编辑