On 08/12/2013 00:59, Mahan Marwat wrote:
Why this is not working.
'Hello, \\\\World'.replace('\\', '\\')
Whoops a daisy!!! --------------^^^^--^^^^ ???
To me, Python will interpret '\\\\' to '\\'. And the replace method will
replace '\\' with '\'. So, the result will be 'Hello, \World'. But it's give me
'Hello, \\\\World'.
The result I want form the code is 'Hello, \World'.
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
--
https://mail.python.org/mailman/listinfo/python-list