I
I
Ilya1992018-06-24 18:34:22
Python
Ilya199, 2018-06-24 18:34:22

How to make a condition for time?

The script starts => 5-10 seconds pass => some action occurs. How can this be done?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mikhail, 2018-06-24
@TheMaxai

import time

time.sleep(5)
print("Hello, i waited 5 seconds")

import random
import time

sec = random.randint(5, 10)
time.sleep(sec)
print("Hello, i waited 5-10 seconds")

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question