import time
def ss (ss):
start = time.perf_counter()
for i in range(ss):
finsh = "▓" * (i + 1)
need_do = "-" * (ss - (i + 1))
progress = ((i + 1) / ss) * 100
dur = time.perf_counter() - start
print("\r{:^3.0f}%[{}->"
"{}]{:.2f}s".format(progress, finsh, need_do, dur), end="")
time.sleep(0.05)
t = [['a', 'b', 'c', 'd', 'e'],['a', 'b', 'c', 'd', 'e'],['a', 'b', 'c', 'd', 'e'],['a', 'b', 'c', 'd', 'e'],['a', 'b', 'c', 'd', 'e'],['a', 'b', 'c', 'd', 'e']]
ss(len(t))
python print打印进度条
于 2022-04-15 11:24:33 首次发布