I know I need to import sleep
of time
:
import time
or
from time import sleep
And that applies like this:
time.sleep(s)
but I do not know how to include it in the rest of the code.
I know I need to import sleep
of time
:
import time
or
from time import sleep
And that applies like this:
time.sleep(s)
but I do not know how to include it in the rest of the code.
The sleep function pauses the execution of the thread on which it is executed, during the indicated time. for example, if I want "world" to go out 5 seconds after "hello". I'm calling timer.sleep (5) .
import time
print "hola"
time.sleep(5)
print "mundo"