import sys import time for i in range(10): print('{}\r'.format(str(i)), end='') sys.stdout.flush() time.sleep(1)
https://pythonkim.tistory.com/96