I\'m trying to create a code for a countdown timer that stays in place: so that each line overwrites the previous one. This is what I have so far:
import tim
When \r
doesn't work, try \x08
(backspace), and add the flush=True
to be safe:
print('\x08' * 5 + timeformat, end='', flush=True)
IDLE doesn't support most control characters such as \r, \b. It is still true in 2020 (no support in Python 3.9)
\r
should work if you start Python REPL in a Unix terminal or in Windows console instead.