python如何从txt文档里读取数据

如题所述

第1个回答  2018-05-27
import sys
f=open(r"G:\\PythonPractise\record.txt","r")
while True:
    line=f.readline()
    print(line,end=" ")
    if not line:
       break
f.close()

追答

我已回答请评价