I like to print something and then replace it with the next value in a way that the previus value will disapear and the new one will replace that. How should I do that? e.g. in
print('Hello World')
for i in range(10):
print('Case Number {} ...'.format(i)) # I like to print with replacement here
print('Good Bye')
I like to have the final output like this:
Hello World
Case Number 9
Good Bye
P.S. I saw Link but it is not giving me answer print('Case Number {} ...'.format(i), end='\r')
does not working for some reason.
Specifically:
print('Hello World')
for i in range(10):
print('Case Number {} ...'.format(i), end='\r') # I like to print with replacement here
print('Good Bye')
will generate:
Hello World
Good Byeber 9 ...