绝对路径
f = open('d:\345.txt',mode='r',encoding='utf-8')
i = f.read()
print(f)
f.close()
View Code
相对路径
f = open('345',mode='r',encoding='utf-8')
i = f.read()
print(f)
f.close()
View Code
标签:文件,Code,utf,encoding,read,345,mode,操作
来源: https://www.cnblogs.com/zly9527/p/11241634.html