python tqdm进度条
安装tqdm
pip install tqdm
传入任意list
from tqdm import tqdm
bar = tqdm(["a", "b", "c", "d"])
for char in bar:
bar.set_description("Processing %s" % char)
手动控制进度
from tqdm import tqdm
import time
with tqdm(total=100) as pbar:
for i in range(10):
pbar.update(10)
time.sleep(1)
还没有评论,来说两句吧...