【Python】-读取txt文件

简单读取:

f=open(r'F: est.txt','r')

将读取的内容存为list:

f=open(r'F: est.txt','r')

arr=[]

for  lines in f:

   arr.append(lines)

f.close()

原文地址:https://www.cnblogs.com/linalove/p/8427445.html