backslashes in lists
Fabio Gomes
flgoms at hotmail.com
Mon Mar 12 10:53:41 EDT 2007
Hi list, I'm trying to use a string with backslashes in a list. But Python parses strings in lists with repr().>>> alist = ['a', 'b', 'c:\some\path']>>> alist['a', 'b', 'c:\\some\\path']>>> print alist['a', 'b', 'c:\\some\\path'] I already tried str() and raw (r) but it didn't work. All I want is to keep a single backslash in the string since it is a path information. Can anyone help me, please? Thank you.
_________________________________________________________________
O Windows Live Spaces está aqui! Descubra como é fácil criar seu espaço na Web e sua rede amigos.
http://spaces.live.com/signup.aspx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20070312/3d4424af/attachment.html>
More information about the Python-list
mailing list