Python‎ > ‎time‎ > ‎

time.sleep


Return
Return delaying the execution of code  in seconds. 
 
Syntax
sleep(x)

Parameters
x=seconds

Import module
Importing module is required in the Shell window and the Editor window.

Example
After input name command, system wait for 10 seconds.
 import time
x=input("Please enter your name: ")
print("Procesing")
time.sleep(10)
if x=="Adil":
print("Welcome")
else:
print("Access Denied")

Output
>>> 
Please enter your name: Adil
Procesing
Welcome
>>>



Comments