Skip to content Skip to sidebar Skip to footer

Why Does The Single Backslash Raw String In Python Cause A Syntax Error?

Also see the Why can't I end a raw string with a backslash? and Why can't Python's raw string literals end with a single backslash? questions and related answers. In my Python 2 p

Solution 1:

The problem here is simple, the system assumes that the single backslash is for escaping, you are escaping your quote, otherwise you have to escape the escape char. This would happen in any environment that lets a character disable another characters function.


Post a Comment for "Why Does The Single Backslash Raw String In Python Cause A Syntax Error?"