Skip to content

Instantly share code, notes, and snippets.

@doctorx
Created November 2, 2021 12:01
Show Gist options
  • Select an option

  • Save doctorx/3e07c284b6ec3e144cc2a9d49c55c73c to your computer and use it in GitHub Desktop.

Select an option

Save doctorx/3e07c284b6ec3e144cc2a9d49c55c73c to your computer and use it in GitHub Desktop.
#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