返回顶部
摘要: 有时候在解析数据出来的时候总是会出现空格,回车\n,制表符\t,或者空,可尝试以下操作: >>> list1 = ['hello,world!', ' ', '\n', '\t', '', 'I am here.'] >>> [x.strip() for x in list1 if x.strip( 阅读全文
posted @ 2021-07-20 10:37 Adrian·Ding 阅读(855) 评论(0) 推荐(0) 编辑