Python 进度条
# Author:Winter Liu is coming! import time def process_bar(num, total): rate_num = int(num*100/total) if rate_num == 100: r = "\r{}{}%\n".format("*"*rate_num, rate_num) # \r回到行首,百分百就换行 else: r = "\r{}{}%".format("*" * rate_num, rate_num) print(r, end="") for i in range(1,21): time.sleep(0.2) process_bar(1000*i, 20000)
相关推荐
哈嘿Blog 2020-10-26
明月清风精进不止 2020-07-05
PythonMaker 2020-07-05
xirongxudlut 2020-06-28
kkpiece 2020-06-16
qscool 2020-06-12
CloudXli 2020-06-11
vs00ASPNET 2020-06-09
Dimples 2020-06-08
kuoying 2020-06-07
JJandYY 2020-05-31
Wyt00 2020-05-30
liuyh 2020-04-03
CloudXli 2020-05-11
世樹 2020-05-11
bizercsdn 2020-05-10
joyjoy0 2020-05-09
sunnyhappy0 2020-05-09