from tqdm import tqdm pbar = tqdm(total=num_iterations) for i in range(num_iterations): pbar.update(1) # advance of 1 iteration step