Martin Panter added the comment:
Python itself doesn’t treat backspace specially. What you are probably seeing
is the terminal interpreting the backspace specially by moving the cursor left
(without erasing anything).
>>> s = "12345" + '\b' + '6'
>>> s
'12345\x086'
>>> s[5] # ASCII code for b
New submission from Jared Bevis:
I'm a new python learner but I noticed inconsistent behavior of the backspace
character when used in strings. I'm running 2.7.10. Whenever the backspace
character '\b' is at the very end of a string, nothing happens, but if it is in
the middle of string it be