Back to Blog Home

How To Use Time Delay In Python

Jay Mishra| Python | 8 months, 1 week


To use time delay in python, you can simply import time module and then use sleep() function with specified time in seconds. Foe example:


import time


This will delay the time by 10 seconds. 


You can also specify the time in sub seconds by using float data type as argument.


from time import sleep
sleep(0.5) # Time in seconds.


This will delay the time by 0.5 seconds. 


Join 1000+ People Who Subscribe to Weekly Blog Updates

Back to Blog Home