python实现最简单的进度条
import sys,time
total = 100
for i in range(total):
a = "#" * i + " " * (100-i) + "["+str(i) + "%"+"]"
sys.stdout.write("\r%s" %a)
sys.stdout.flush()
time.sleep(0.1)
2018-06-20 14:20:49
浏览 5195
python实现最简单的进度条
import sys,time
total = 100
for i in range(total):
a = "#" * i + " " * (100-i) + "["+str(i) + "%"+"]"
sys.stdout.write("\r%s" %a)
sys.stdout.flush()
time.sleep(0.1)
随时随地看视频慕课网APP
相关课程