readline的用法

with open(r'C:\Users\admin\pycdtest\wanyue\llduizhang_20180207\33_1517970821000304388_119061116',encoding='utf-8') as f:
  line = f.readline()
#print(type(line))
  while line:
    #对line进行操作
    line = f.readline()#最后

  

posted on 2018-02-22 15:51  hailuo  阅读(1953)  评论(0编辑  收藏  举报