Home Python How to Wait for a Seconds In Python

How to Wait for a Seconds In Python

0
How to Wait for a Seconds In Python

Do you really want to wait for a second in Python so we have great info with a complete guideline so let start first of all import the time in your file then the python provides a built-in function that name is time.sleep() so, using this function you can easily add the time as much as you want. So, I want to wait 300 milliseconds. get the code below and past in your file, and just change time.sleep(.300) and add as much as you need.

import time
 
# Wait for 5 seconds
time.sleep(5)
 
# Wait for 300 milliseconds
# .3 can also be used
time.sleep(.300)

LEAVE A REPLY

Please enter your comment!
Please enter your name here