返回顶部

收藏

Iterating Over Lines with readlines

更多
f = open('filename')
for line in f.readlines():
    #process(line)

标签:Python,File

收藏

0人收藏

支持

0

反对

0

»更多 您可能感兴趣的代码
  1. 2016-02-11 11:05:41Loop through a file by jack.chen
  2. 2016-03-27 14:52:35Close a file after using by Solon.Ring
  3. 2016-05-30 16:40:50Reading a binary File by 西国の海妖
  4. 2016-08-19 16:12:51File Random Access by 张宋付
  5. 2016-09-20 18:13:43Use seek() to move file pointer by 大猪
  6. 2016-10-04 12:15:46Write string to a file by 司马
  7. 2016-11-20 11:31:44Close a file by xwz
  8. 2016-08-19 16:23:52Adding Line Numbers to a Python Script by 西国の海妖
  9. 2016-09-22 11:48:20Define class to deal with files by 阿明娃儿
  10. 2016-10-14 16:12:39Change Dir by 大猪
  11. 2017-01-06 09:11:02Loop through header information in a ZIP file by 阮小七

发表评论