主页
Python
Python 打开文件
demo_file_open_d
运行 ❯
×
更改方向
保存代码
更改主题
f = open("D:\\myfiles\welcome.txt", "r") print(f.read())
Welcome to this text file!
This file is located in a folder named "myfiles", on the D drive.
Good Luck!