representing a literal single slash
hellen at claggetts.net
Sun Sep 15 04:28:02 CEST 2002
Here is an easy question (I'm hoping).
I'm trying to process a string so that all doubled up backslashes (\\)
are replaced with a single backslash (\).
The obvious approach doesn't work since a single backslash can't end a
str = str.replace('\\', '\') # broken
So, how does one represent a literal single slash? unicode or hex
More information about the Python-list