Reputation: 61
Where to get the File name from?
file= open("C:\Users\Dell\Desktop\ll\file3.txt", "r")
python shows me that there is a syntax error,is it the file name?
Upvotes: 1
Views: 256
Reputation: 117856
You need to use a raw string literal
r"C:\Users\Dell\Desktop\ll\file3.txt"
or escape your backslashes
"C:\\Users\\Dell\\Desktop\\ll\\file3.txt"
Upvotes: 3