Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
from time import time
seconds_to_work = 60 # Сколько выполнять цикл, в секундах
start = time() # время начала выполнения
while time() - start < seconds_to_work:
print(...)
from time import time
seconds_to_work = 60 # Сколько выполнять цикл, в секундах
start = time() # время начала выполнения
while True:
if time() - start < seconds_to_work:
break
print(...)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question