#encoding:utf-8
file = "D:/t.txt"
fp = open(file)
try:
#response = fp.write("aaa|\n")
#print response
rows = fp.readlines()
for row in rows:
print row
finally:
fp.close()
python文件操作
最新推荐文章于 2023-03-12 22:55:05 发布
#encoding:utf-8
file = "D:/t.txt"
fp = open(file)
try:
#response = fp.write("aaa|\n")
#print response
rows = fp.readlines()
for row in rows:
print row
finally:
fp.close()