12 lines
204 B
Python
12 lines
204 B
Python
import time
|
|
from tqdm import tqdm
|
|
|
|
pbar = tqdm(total=30)
|
|
|
|
for i in range(31): # 包含0~30
|
|
pbar.n = i # 直接设置进度
|
|
pbar.refresh() # 刷新显示
|
|
time.sleep(0.2)
|
|
|
|
pbar.close()
|