摘要: 用用awk切分数据 阅读全文
posted @ 2019-08-13 21:29 云深不知、处 阅读(520) 评论(0) 推荐(0) 编辑
摘要: 文件 runoob.txt 的内容如下: readlines() 方法用于读取所有行(直到结束符 EOF)并返回列表,该列表可以由 Python 的 for... in ... 结构进行处理。 如果碰到结束符 EOF 则返回空字符串。 writelines() 方法用于向文件中写入一序列的字符串。 阅读全文
posted @ 2019-08-13 17:12 云深不知、处 阅读(4438) 评论(0) 推荐(0) 编辑
摘要: s=' 'if s.strip()=='': print 's is null' 或者if not s.strip(): print 's is null' [已验证] 阅读全文
posted @ 2019-08-13 16:45 云深不知、处 阅读(7274) 评论(0) 推荐(0) 编辑