with open('C:/User/PGL/Desktop/yum.txt') as file_object:contents = file_object.read()print(contents)这是代码,该文件就在桌面上,但是运行出来的结果却显示no such file or directory.求帮助啊
C:Users/少了一个s
错误很明显,肯定是你的文件路径错了!一般路径不是:C:/Users 么?你的是 User?建议复制路径,不要自己手写!
谢谢回复,不胜感谢!