Skip to content

Instantly share code, notes, and snippets.

@adamoudad
Last active October 13, 2020 21:49
Show Gist options
  • Save adamoudad/233d1db8be89be5bbe1e27df32eb19c9 to your computer and use it in GitHub Desktop.
Save adamoudad/233d1db8be89be5bbe1e27df32eb19c9 to your computer and use it in GitHub Desktop.
from tqdm import trange
iterations = 10
with trange(iterations, unit="carrots") as pbar:
for i in pbar:
sleep(0.5)
if i % 2:
pbar.set_description(f"Testing odd number {i}")
else:
pbar.set_description(f"Testing even number {i}")
pbar.set_postfix(divisors=get_divisors(i))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment