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)

 

相关文章:

  • 2021-09-01
  • 2021-09-08
  • 2021-06-27
  • 2021-07-14
  • 2021-10-10
  • 2021-11-08
  • 2021-06-11
猜你喜欢
  • 2022-03-01
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-07
  • 2022-12-23
相关资源
相似解决方案