摘要:
用用awk切分数据 阅读全文
摘要:
文件 runoob.txt 的内容如下: readlines() 方法用于读取所有行(直到结束符 EOF)并返回列表,该列表可以由 Python 的 for... in ... 结构进行处理。 如果碰到结束符 EOF 则返回空字符串。 writelines() 方法用于向文件中写入一序列的字符串。 阅读全文
摘要:
s=' 'if s.strip()=='': print 's is null' 或者if not s.strip(): print 's is null' [已验证] 阅读全文