print "\\"
But I want to get string \
How to get string string \
?
There's clearly some sort of configuration with your console that's wrong. Doing this:
print "\\"
Clearly prints \
for me.
You can add letter r to string before quotes (r for raw). It will ignore all special symbols.
For example
>>> print '\x63\\ Hello \n\n8'
c\ Hello
8
>>> print r'\x63\\ Hello \n\n8'
\x63\\ Hello \n\n8
So printing backslash is print r'\'