python读取文件
例如读取text.txt文件中内容
with open('text.txt','r',encoding='utf8') as f:
for line in f.readlines():
print(line)
本文来自博客园,作者:半糖青柠,转载请注明原文链接:https://www.cnblogs.com/tianz/p/16033856.html
例如读取text.txt文件中内容
with open('text.txt','r',encoding='utf8') as f:
for line in f.readlines():
print(line)
本文来自博客园,作者:半糖青柠,转载请注明原文链接:https://www.cnblogs.com/tianz/p/16033856.html