Escaping the semicolon?

Nick nickjbyrne at gmail.com
Tue Dec 4 10:40:40 EST 2007


Hi all,

Is this expected behavior?

>>> s = '123;abc'
>>> s.replace(';', '\;')
'123\\;abc'

I just wanted a single backslash. I can see why this probably happens
but i wondered if it is definitely intentional.

Thanks
Nick



More information about the Python-list mailing list