伊谢尔伦2017-04-18 09:30:05
tqdm Refer to the demo on the website.
Progress Bar for Console Programs as Iterator If you want to write it yourself, you can refer to this, it is also very good.
黄舟2017-04-18 09:30:05
print()
其实就可以。用unicode的字符表示进度。然后用"r"
Remove the carriage return.
Just one code is enough:
import time
i = 1
while i < 50:
s = "█" * i
print("{}\t\t{}".format(s, i), end="\r")
i += 1
time.sleep(1)