因此,我只是在修改open()函数,我正在编写一个简单的程序来替换其他.txt文件中的文本。这是我的代码:f.write("This text has been replaced.")print("Text replaced")
所以,在运行这个程序之后,"file.txt“中的文本正在发生变化。我正在使用Python3.9,<
import pyautoguifor word in f: pyautogui.press("enter") 并得到错误: FileNotFoundError: [Errno 2] No such file or directory: 'beemovie.txt' 我检查了拼写是否正确,但似乎什么都不起作用我知道我已经被问了几百万次