asctime() and ctime() function in python by R4R Team

- asctime() is a python time function which return the exact time of the real world or time of your system machine.
- ctime() function are also similar as asctime().


Syntax-

time.asctime()

-Here time is a library in which asctime() function is predefined.

-It return the following format
'day month date time year'


program-

import time
print("Day and time is")
print(time.asctime())


output-

Day and time is
Mon Apr 29 01:33:43 2019


-After 26 seconds

Day and time is
Mon Apr 29 01:34:09 2019


-In this program, we print the exact day and time, so today is april 29 2019, monday 1 AM.




Leave a Comment:
Search
Categories
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!