from tqdm import tqdm, trange
import time
if __name__ == '__main__':
for i in trange(10):
time.sleep(1)
for i in tqdm(range(10), desc='处理中'):
time.sleep(1)
dic = ['a', 'b', 'c']
pbar = tqdm(dic)
for i in pbar:
pbar.set_description('处理' + i)
#pbar.update(26) #手动更新
time.sleep(1)
输出如图: