2014年7月5日

python 逐行读取文本

摘要: f = open("foo.txt") # 返回一个文件对象line = f.readline() # 调用文件的 readline()方法while line: print line, # 后面跟 ',' 将忽略... 阅读全文

posted @ 2014-07-05 18:42 strikebone 阅读(2268) 评论(0) 推荐(0) 编辑

导航