Home/Support/Support Forum/On the spot counter
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

On the spot counter

0 votes
I would like to display a count in the Console such that each increment is replaced in the same place (at start of line) by the next.
Having looked at posts on overwriting the last line, I thought this should work ok, but it adds each increment to the last line instead of replacing it

Python Code:
import time
for i in range (15):
print(i, end="\r")

result is:
note also that when it gets to 6 there is a long gap to 7:
123456 7

What am I doing wrong?

Many thanks
asked Nov 28, 2019 in 3rd Party Python and API development in other Languages by damnnv New to the Community (0 points)
reshown Dec 6, 2019 by mvut

Please log in or register to answer this question.