import time import sys print('Update the same line in console output') sys.stdout.write('Doing task a\r') sys.stdout.flush() time.sleep(1) sys.stdout.write('Doing task b\r') sys.stdout.flush() time.sleep(1) sys.stdout.write('Doing task c\n') time.sleep(1) print('done')
No comments:
Post a Comment