Articles → Python → Time.Sleep Function In Python

Time.Sleep Function In Python






Purpose





Example


import pyautogui
import datetime
import time

print("Time before sleep function:", datetime.datetime.now())
time.sleep(3)
print("Time after sleep function:", datetime.datetime.now())



Example


Picture showing the output of time.sleep function in python



Posted By  -  Karan Gupta
 
Posted On  -  Monday, May 27, 2019

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250