I am trying to build a simple progress bar in python, with '\\r' and end='':
In [1]: for i in range(100):
...: print("\rUploading some sort of data: ", i, "/", 100, end='')
...: time.sleep(0.1)
The expected out would be like:
Uploading some sort of data: 99 / 100
But it now gives me this:
Uploading some sort of data: 99 / 100/ 100 100100
(I am using Spyder and I am not encountering this issue with windows command, is it the problem of Spyder? and how should I solve this?)
Thanks!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.