printing backslash

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • micklee74@hotmail.com

    #1

    printing backslash

    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

Working...