1import time
2
3# Wait for 5 seconds
4time.sleep(5)
5
6# Wait for 300 milliseconds
7# .3 can also be used
8time.sleep(.300)
9
1import time
2while True:
3 print("This prints once a minute.")
4 time.sleep(60) # Delay for 1 minute (60 seconds).
1import time
2
3print("Printed immediately.")
4time.sleep(2.4)
5print("Printed after 2.4 seconds.")