Created
October 8, 2020 21:32
-
-
Save ctrlaltdev/d51bf16956fb6a96e14cbe65cd937271 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
import time | |
import math | |
def loader(index=0, total=100): | |
max = 25 | |
tty = math.floor(index * max / total) | |
bar = ('#' * tty) + ('_' * (max - tty)) | |
print('[{}] - {}/{}'.format(bar, index, total), end = '\n' if index == total else '\r') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment