Last active
October 9, 2021 01:03
-
-
Save karolzlot/e1497f8a2cc888616c97c685eb251e5c to your computer and use it in GitHub Desktop.
tdqm multiline example 1
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
from tqdm import tqdm | |
from time import sleep | |
with tqdm(total=4, desc='1st loop', position=2) as pbar1: | |
with tqdm(total=5, desc='2nd loop', position=1) as pbar2: | |
with tqdm(total=50, desc='3rd loop', position=0) as pbar3: | |
for i in range(4): | |
pbar2.reset() | |
for j in range(5): | |
pbar3.reset() | |
for k in range(50): | |
pbar3.update(1) | |
sleep(0.01) | |
pbar2.update(1) | |
pbar1.update(1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment