使用with open("D:\backup\test.txt","rt") as f:报上面的错误,将上面的语句改成
with open(r"D:\backup\test.txt","rt") as f:
字符串前面加r,表示的意思是禁止字符串转义
使用with open("D:\backup\test.txt","rt") as f:报上面的错误,将上面的语句改成
with open(r"D:\backup\test.txt","rt") as f:
字符串前面加r,表示的意思是禁止字符串转义