python的tqdm循环进度条显示

    xiaoxiao2022-07-04  151

    Tqdm 是一个快速,可扩展的Python进度条,可以在 Python 长循环中添加一个进度提示信息,用户只需要封装任意的迭代器 tqdm(iterator)。

    1、安装

    pip install tqdm

    2、使用

    import time from tqdm import tqdm from tqdm._tqdm import trange for i in tqdm(range(100)): time.sleep(0.01)

    效果如下:

    最新回复(0)