from tqdm import tqdm
import time
bar = tqdm(range(100))
for i in bar:
bar.set_description(f"进度条:迭代次数{i}")
time.sleep(0.01)
运行结果:
进度条:迭代次数100: 100%|██████████| 100/100 [00:01<00:00, 64.30it/s]
from tqdm import tqdm
import time
bar = tqdm(range(100))
for i in bar:
bar.set_description(f"进度条:迭代次数{i}")
time.sleep(0.01)
运行结果:
进度条:迭代次数100: 100%|██████████| 100/100 [00:01<00:00, 64.30it/s]