Python去除list中的空字符Python去除list中的空字符 Python去除list中的空字符list1 = ['122', '2333', '3444', '', '', None]a = list(filter(None, list1)) # 只能过滤空字符和Noneprint(a) # ['122', '2333', '3444'] python 2024-10-15 39 点赞 0 评论 59 浏览