Created
February 18, 2022 09:38
-
-
Save KristobalJunta/1d4caea5eccd34d8a7c8e636aa524837 to your computer and use it in GitHub Desktop.
Simple progress indicator in python (string rewrites itself)
This file contains 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
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