python打印进度条

import sys,time

第一种方法:
for i in range(50):
    sys.stdout.write("#")
    time.sleep(0.1)
    sys.stdout.flush()



第二种方法:
for i in range(10):
    print("#",end="",flush=True)
    time.sleep(0.4)


 
自己不努力,谁也给不了自己想要的生活
原文地址:https://www.cnblogs.com/zhangyux/p/5998741.html