Hello! I didn't look at your code but the simplest way is just to use time.sleep(delay). It suspends execution of the code for a certain amount of time. Time can be a float type.
import time while #condition: # code execution # condition change time.sleep(1)Or you can use a for loop to execute the code specific number of times with if statement in it to check for a condition
for i in range(counter): if condition: #execute the code time.sleep(1) else: break