tqdm 新版本中有 jupyter 专用样式的进度条

from tqdm.notebook import tqdm

使用 tqdm 只需将需要迭代的对象传入即可

for i in tqdm(iterable):
    # do something