What I'm trying to code is pretty simple:
I want to print an iteration variable, but I don't want all the lines printed for each loop, I want that will update the previous one.
Example:
for i in range(0,2000):
print 'number is %d', %i
Wrong result:
number is 0
number is 1
number is 2
number is 3
number is 4
number is 5
number is 6
...
...
What I want is:
number is 0
At the second iteration:
number is 1 `(it will replace 0 and I don't want the previous 0 anymore).`
It will be something like updating percentage of something in only one line.
Does a function exist for it in Python?