Python之进度条
pip install tqdm
from tqdm import tqdm,trange import time for char in tqdm(['a','b','c','d']): time.sleep(0.2) for i in trange(4): time.sleep(0.2) for i in trange(10): time.sleep(0.2) pbar = tqdm(["a", "b", "c", "d"]) for char in pbar: time.sleep(0.8) pbar.set_description("Processing %s" % char) with tqdm(total=100) as pbar: for i in range(10): time.sleep(1) pbar.update(10)
黄世宇/Shiyu Huang's Personal Page:https://huangshiyu13.github.io/