标签:数据显示 oat success std flush 刷新 orm format mat
import sys
import time
n = 1
while n <= 100:
sys.stdout.write(‘{}{:.0f}%\r‘.format(‘*‘ * n, float(n / 100) * 100))
if n == 100:
sys.stdout.write(‘Success\n‘)
time.sleep(0.1)
n += 1
>
import sys
import time
n = 1
while n <= 100:
sys.stdout.write(‘{}‘.format(‘*‘))
sys.stdout.flush()
if n == 100:
sys.stdout.write(‘Success\n‘)
time.sleep(0.1)
n += 1
标签:数据显示 oat success std flush 刷新 orm format mat
原文地址:https://www.cnblogs.com/halvin/p/14241142.html