with open("D:\\test.txt", "w") as f:
f.write("Hello, World!")
报错为:
OSError: [Errno 9] Bad file descriptor
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\CHENHao\Python\Project\test.py", line 1, in
with open("D:\test.txt", "w") as f:
OSError: [Errno 9] Bad file descriptor
代码本身应该没错吧?各位大拿帮我看下到底什么原因呢?