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)
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)
相关课程