I need to print a string as part of a list that has 3 backslashes in it in Python. However, this is not appearing to be as simple as I expected.
print ["\\\"]
Traceback (most recent call last):
File "<string>", line 1, in <fragment>
EOL while scanning string literal: <string>, line 1, pos 13
Any string that has an odd number of backslashes will do this because Python is escaping the quote. So I tried escaping myself:
print ["\\\\\\"]
['\\\\\\']
which is 6 backslashes. Not what I wanted. This has stumped a few of us around the water cooler.