def process(percent):
res=int(percent * 50) * '#'
print('\r[%-50s] %d%%' %(res,percent * 100),end='')
down=0
total=12345
while down< total:
import time
time.sleep(0.3)
down+=1024
percent=down/total
process(percent)
python之进度条小程序
最新推荐文章于 2022-11-04 15:58:47 发布