当我尝试执行以下写入文件时,我收到如下所示的错误...我做错了什么?
# create a method that writes to a file.
f = open("C:\Users\QamarAli\Documents\afaq's stuff\myFile.txt", "r+")
f.write('0123456789abcdef')
这是错误:
Traceback (most recent call last):
File "<interactive input>", line 1, in <module>
IOError: [Errno 22] invalid mode ('r+') or filename: "C:\\Users\\QamarAli\\Documents\x07faq's stuff\\myFile.txt"
>>>