Loading

文件读写

f = open('.\\test.txt', mode='r', encoding='utf-8')  # 打开文件
text = f.read()  # 读取文件
print(text)  # 打印内容
f.close  # 关闭文件
posted @ 2023-09-08 14:37  袁铁帅  阅读(16)  评论(0)    收藏  举报