I've been trying to make a program in python that replaces the printed value in the console with the next value, in essence making a rudimentary timer.
After looking through the web for a while, I landed on this bit of code:
import time
number = 0
while True:
print(number, end = "\r")
number += 1
time.sleep(1)
This would supposedly remove the previously printed number and replace it with a new one, but instead I got this output:
0123456789
What is going on?