Skip to content

Instantly share code, notes, and snippets.

@karolzlot
Last active October 9, 2021 01:03
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 karolzlot/e1497f8a2cc888616c97c685eb251e5c to your computer and use it in GitHub Desktop.
Save karolzlot/e1497f8a2cc888616c97c685eb251e5c to your computer and use it in GitHub Desktop.
tdqm multiline example 1
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