You don't need to escape slashes if you use a regexp string like this: r'no need to escape slash\n'.
But I do see syntax errors if the bare slash is at the end:
>>> r'slash at end\'
File "<stdin>", line 1
r'slash at end\'
^
SyntaxError: EOL while scanning string literalSpecifically, a raw string cannot end in a single backslash (since the backslash would escape the following quote character).