import time
for i in range(0, 101, 2):
time.sleep(0.3)
num = i // 2
if i == 100:
process = "
[%3s%%]: |%-50s|
" % (i, '|' * num)
else:
process = "
[%3s%%]: |%-50s|" % (i, '|' * num)
print(process, end='', flush=True)
|
[100%]: ||||||||||||||||||||||||||||||||||||||||||||||||||||
备注说明