Skip to content

Instantly share code, notes, and snippets.

@KristobalJunta
Created February 18, 2022 09:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KristobalJunta/1d4caea5eccd34d8a7c8e636aa524837 to your computer and use it in GitHub Desktop.
Save KristobalJunta/1d4caea5eccd34d8a7c8e636aa524837 to your computer and use it in GitHub Desktop.
Simple progress indicator in python (string rewrites itself)
from time import sleep
n = 10
for i in range(n + 1):
print(f"\rsleeping ... {i} / {n}", end="\r")
sleep(.5)
print()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment