文件操作

绝对路径

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

 

posted @ 2019-07-24 23:43  套你大象  阅读(90)  评论(0编辑  收藏  举报