I have a code like this:
import time
print("some previous print", end='\r', flush=True)
for i in range(10):
print("progress " + str(i), end='\r', flush=True)
time.sleep(1)
The result is something like progress 9ous print
- so it just cuts previous print by length.
I could have something like end=' \r'
to make length longer, but not ideal and flexible solution. Any ideas?