It is really simple. Check out the following code snippet:
import time
time.sleep(5) # Delays for 5 seconds. You can also use a float value.
Also, check this out. I have another example for you where a piece of code is run once in a minute.
import time
while True:
print("This prints once a minute.")
time.sleep(60) # Delay for 1 minute (60 seconds).
Hope this helped!