Answers for "do something every second python"

3

how to run a function in interval in python

# this makes program sleep in intervals
from time import time, sleep
while True:
    sleep(1 - time() % 1) # run every 1 second... you can change that
	# thing to run
Posted by: Guest on December-22-2020
0

every second value python

import numpy as np
values=np.arange(0,10)
print(values[::2])
Posted by: Guest on March-21-2020

Code answers related to "do something every second python"

Python Answers by Framework

Browse Popular Code Answers by Language