Technically, any odd number of backslashes, as described in the documentation.
>>> r\'\\\'
File \"\", line 1
r\'\\\'
^
Syn
Another trick is to use chr(92) as it evaluates to "\".
I recently had to clean a string of backslashes and the following did the trick:
CleanString = DirtyString.replace(chr(92),'')
I realize that this does not take care of the "why" but the thread attracts many people looking for a solution to an immediate problem.