Python | Adding Delays with Time Sleep

preview_player
Показать описание
With the Time module's Sleep function you can incorporate a time delay in a process whether it be to render some information outside the program or to temporarily pause the process.

To give a delay we will first import the time module which is a built-in module and pass the parameter for seconds of delay we want to incorporate.
Рекомендации по теме
Комментарии
Автор

You can write also from time import sleep.And then for delay just write sleep("delay")

_Kater_
Автор

When I put time.sleep(1) in a function it doesn’t do anything. It runs the program as if it isn’t there but I can use it when it’s not in a function. Someone help?

samrodwell
Автор

ow does this work if there are two threads?

fernandohood
Автор

u r a good mann cause of u i did my program thanks alot

yousefyasser
Автор

Is there a way to sleep just a certain thing of code and not the entire python file?

therealmaxflyman
Автор

How can you tell it to sleep anywhere from 3-5sec ? making the delay random

zdwave
Автор

Im using Thonny compiler and this doesnt work, it doesnt understand time.sleep()

Silverballerc
Автор

wont work even if i put the "import time"

orange_juice-pop.-.
Автор

What do u use to type the code what program and where can i download it

GeorgesABG
welcome to shbcf.ru