I am trying to output text to stdout, overwriting the previous text, for example
for i in range(12):
print i
but with i replacing the previous value each time rather than appearing on a new line From looking at quite a few previous posts with similar questions it seems that there are a few ways of doing this, possibly the simplest being (for Python 3.x on)
for i in range(12):
print(i,end="\r")
sometimes with a comma at the end of the print statement, sometimes not. However, without the comma I get no output at all and with the comma I get
(None,)
(None,)
(None,)
...
Is this something related to my terminal perhaps? I get similar results no matter which of the previous posted solutions to the problem I try. Thanks for any help!