When I tried appending a string containing a backslash into a list, the element in the list is actually the string, but with double backslashes instead of single backslashes.
Code is as follows:
word = "<< hello\world"
sample = list()
sample.append(word)
print(sample) #['<< hello\\world']
print word #<< hello\world
Can anybody explain what is going on, and how to work around this?