Learning about using time.sleep() to make your program wait
17prabkann (1)

Use 'import time' to import time function. Then when u need to use it use the line 'time.sleep()' to make the program to wait for specific amount of time. For example:
import time
print("Hello")
time.sleep(3)
print("Make sure that you add a number of seconds to make it actually wait!")

You are viewing a single comment. View All
AllAwesome497 (247)

Time.sleep is good, but it is bad to use in any web application, since it freezes the entire application instead of a single task. asyncio.sleep pauses a single task only, making it useful (on certain occasions) in web applications.