[EMAIL PROTECTED] 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
>
> eventu
Tim Chase wrote:
> > i want to print something like this
> >
> > |\|
> >
> > first i tried it as string
> >
> > a = "|\|"
> >
> > it prints ok
> >
> > but when i put it to a list
> >
> > a = ["|\|"]
> >
> > it gives me '|\\|' .there are 2 back slashes...i only want one.. how
> > can i properly es
hi
how can i sucessfully print |\| in the output of a print command
a = "|\|"
print a
but it gives me "|\\|"
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
> i want to print something like this
>
> |\|
>
> first i tried it as string
>
> a = "|\|"
>
> it prints ok
>
> but when i put it to a list
>
> a = ["|\|"]
>
> it gives me '|\\|' .there are 2 back slashes...i only want one.. how
> can i properly escape it?
> I have tried [r"|\|"] , [r'\\'] b
[EMAIL PROTECTED] wrote:
> i want to print something like this
>
> |\|
>
> first i tried it as string
>
> a = "|\|"
>
> it prints ok
>
> but when i put it to a list
>
> a = ["|\|"]
>
> it gives me '|\\|'.
if you want to print "|\|", why are you printing the list?
> there are 2 back slashe
hi
i want to print something like this
|\|
first i tried it as string
a = "|\|"
it prints ok
but when i put it to a list
a = ["|\|"]
it gives me '|\\|' .there are 2 back slashes...i only want one.. how
can i properly escape it?
I have tried [r"|\|"] , [r'\\'] but they do not work...
thanks