printing backslash
Steve Holden
steve at holdenweb.com
Wed Jun 7 14:48:33 EDT 2006
micklee74 at hotmail.com wrote:
> hi
> how can i sucessfully print |\| in the output of a print command
>
> a = "|\|"
> print a
>
> but it gives me "|\\|"
>
No it doesn't:
>>> a = "|\|"
>>> print a
|\|
>>>
> i tried raw strings too, but it doesn't print |\| . It prints |\\|
> instead
>
> eventually, i also want |\| to be inside a list:
> alist = ["|\|", 'blah', 'blah'] . How can i put |\| inside a list?
>
> can someone show me how it can be done?
> thanks
>
Well, you've got it now, so I won't labour the point.
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Love me, love my blog http://holdenweb.blogspot.com
Recent Ramblings http://del.icio.us/steve.holden
More information about the Python-list
mailing list