sbunny8
0
Q:

how to add delay in python

import time

time.sleep(5) # sleeps for 5 seconds
9
import time
while True:
    print("This prints once a minute.")
    time.sleep(60) # Delay for 1 minute (60 seconds).
12
>>> import time
>>> time.sleep(3) # Sleep for 3 seconds
11

New to Communities?

Join the community