what is the purpose of backward-slash b in python, I ran print \"\\\"foo\\bar\" in the python interpreter and got this result:
>>>p
The \b
is a back space character
\b ASCII Backspace (BS)
If you want to print the string \foo\bar
do this:
>>> print r"\foo\bar"
\foo\bar
This utilizes the raw strings available in python.
String literals may optionally be prefixed with a letter 'r' or 'R'; such strings are called raw strings and use different rules for interpreting backslash escape sequences
See the string literal documentation:
\b
ASCII Backspace (BS)
It produces a backspace character. Your terminal backspaced over the second o
when printing that character.