好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

使用python3打印一个进度条反方法

# Auther: Aaron Fan
import sys,time
for i in range(30):
#打印一个#号,这种方法打印不会自动换行
sys.stdout.write('#')
#实时刷新一下,否则上面这一条语句,会等#号全部写入到缓存中后才一次性打印出来
sys.stdout.flush()
#每个#号等待0.1秒的时间打印
time.sleep(0.1)

以上就是使用python3打印一个进度条反方法的详细内容,更多请关注Gxl网其它相关文章!

查看更多关于使用python3打印一个进度条反方法的详细内容...

  阅读:38次