A backslash in a string or char literal is followed by something that isn't a valid escape.
The escapes are \n \t \r \0 \\ \" \' and \u{1F986}; anything else is rejected so a typo
can't silently change the text.
Wrong#
fn path(): str = "C:\auk\files"Fixed#
fn path(): str = r"C:\auk\files"Common causes#
- A Windows path or regex in a normal string: use a raw string
r"..."or write\\. \x41or\u0041from other languages: write\u{41}.- A code point above
\u{10FFFF}.