SyntaxFix
Write A Post
Hire A Developer
Questions
In Python 3.3+ you don’t need sys.stdout.flush(). print(string, end='', flush=True) works.
sys.stdout.flush()
print(string, end='', flush=True)
So
print('foo', end='') print('\rbar', end='', flush=True)
will overwrite ‘foo’ with ‘bar’.