f = open('test.txt','r')
for line in f:
    pass
    print i
f.close()


转载于:https://my.oschina/qujinliang/blog/657941

更多推荐

python每次读取文件一行输出一行