python do function every second code example
Example 1: run every minute python
from time import time, sleep
while True:
sleep(60 - time() % 60)
# thing to run
Example 2: every second value python
import numpy as np
values=np.arange(0,10)
print(values[::2])