Created
November 2, 2021 12:01
-
-
Save doctorx/3e07c284b6ec3e144cc2a9d49c55c73c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Try this: | |
| import sys | |
| import time | |
| for i in range (10): | |
| sys.stdout.write('\r'+str(i)) | |
| time.sleep(0.5) | |
| import time | |
| for i in range (10): | |
| print(i, end="\r") | |
| time.sleep(0.5) # This line is to see if it's working or not | |
| #Source https://newbedev.com/flush-output-in-for-loop-in-jupyter-notebook |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment