下载了txt文本到桌面上,然后用pycharm读取文件,但是显示找不到该文件,这是为什么呢
你路径都没写对
f = open('C:\users\admin\Desktop\pi.txt.txt', 'r') print(f.read()) f.close()