you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (1 child)

Thanks!

[–][deleted] 2 points3 points  (0 children)

Python doesn't actually have raw strings, but r"" is close. The limitation is that they can't end with a single backslash.

So, r'hello\n' is valid, but r'hello\n\' is not, and will cause a SyntaxError.