About 11,900,000 results
Open links in new tab
  1. python - How do I make a time delay? - Stack Overflow

    Use time.sleep or Event().wait like this: from threading import Event from time import sleep delay_in_sec = 2 # Use time.sleep like this sleep(delay_in_sec) # Returns None print(f'slept …

  2. How to make a Python program wait? - GeeksforGeeks

    Apr 17, 2025 · How to make a Python program wait? The goal is to make a Python program pause or wait for a specified amount of time during its execution. For example, you might want …

  3. The Python Sleep Function – How to Make Python Wait A Few Seconds ...

    Aug 24, 2020 · In this article, you’ll learn how to put your Python code to sleep. Python’s time module contains many time-related functions, one of which is sleep(). In order to use sleep (), …

  4. Python sleep(): How to Add Time Delays to Your Code

    In this tutorial, you'll learn how to add time delays to your Python programs. You'll use decorators and the built-in time module to add Python sleep() calls to your code. Then, you'll discover …

  5. Python’s time.sleep() – Pause, Stop, Wait or Sleep your Python

    Python's time module has a handy function called sleep (). Essentially, as the name implies, it pauses your Python program. The time.sleep ()command is the equivalent to the Bash shell's …

  6. Python Sleep Methods | How to Make Code Pause or Wait

    Aug 20, 2024 · To pause or delay execution in Python, you can use the sleep() function from Python’s time module: time.sleep(5). This function makes Python wait for a specified number …

  7. How to Use wait() Function in Python? - Python Guides

    Jan 6, 2025 · One of the most basic and commonly used wait functions in Python is time.sleep(). This function suspends execution of the current thread for a specified number of seconds. …

  8. Python time.sleep(): Add Delay to Your Code (Example) - Guru99

    Aug 12, 2024 · Python sleep() function will pause Python code or delay the execution of program for the number of seconds given as input to sleep(). The sleep() function is part of the Python …

  9. The Python Sleep Function – How To Make Python Wait A Few Seconds ...

    Sep 6, 2024 · The sleep() function lives in Python‘s builtin time module. To use it, import sleep: from time import sleep. sleep() takes a single parameter: the number of seconds to pause your …

  10. Python - How to delay few seconds - Mkyong.com

    Sep 21, 2015 · In Python, you can use time.sleep(seconds) to make the current executing Python program to sleep or delay a few seconds. Full example. def main (): while True: print …

  11. Some results have been removed
Refresh