python实现最简单的进度条
import sys,timetotal = 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)
页:
[1]