I'm making a version of Candy Box. Here is my code so far
import time
print("Candy box")
candy = 0
while True:
time.sleep(1)
candy += 1
print("You have ", candy, " candies.")
The problem is that this will output many lines one after the other when I want the last to be updated. Example:
Instead of:
You have 3 candies.
You have 4 candies.
You have 5 candies.
It would be:
You have 3 candies.
And then it would turn into:
You have 4 candies.