How can i create timer or contdown in python?

Question:

Is there any function or way that I can greate timer in python?

For example:you have 5 seconds to slove this question or maybe to calculate total time for solving this question
The simple one countdown:
enter image description here

Asked By: Luiza

||

Answers:

Here is your code:

import time
run = int(input(""))
if run:
    for i in range(1, run+1):
        time.sleep(1)
        print(i)
Answered By: Divya Prakash
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.