Skip to content

How to Wait for a Seconds In Python

  • by
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
# Wait for 300 milliseconds
# .3 can also be used

Leave a Reply

Your email address will not be published. Required fields are marked *