1

I am using python3 on repl.it. I was trying to print a backspace but it prints instead print("hello\bworld") should print hellworld but it prints helloworld. I tried to use sys.stdout.write("\b") but it still prints .
Can someone please help?

Hippolippo
  • 803
  • 1
  • 5
  • 28
  • Works for me on a normal Linux terminal -- repl.it probably doesn't recognize/respect backspaces and such. – Linuxios Jun 06 '18 at 18:54

1 Answers1

0

Use repr. repl.it uses the browser to render the characters. If you compare the number of characters in the output (by using Chrome's JS console, for example), you'll see that print('abc') has the same number as print('a\bc').

cwallenpoole
  • 79,954
  • 26
  • 128
  • 166