Beginner in python, how can I make a timer which prints out the time left, which also stops when a user presses and enters any key. Here is my code right now:\
import time
keep_going = input("Press any key to stop the timer")
for i in range(3):
print(i + 1),
time.sleep(1)
if keep_going != " ":
break
But it doesn't work because the timer starts after the question is asked.