Python time process asctime() exchanges a Tuple or struct_time in lieu of a time as revisited by gmtime() or localtime() to a 24-character string of the subsequent form: 'Tue Feb 17 23:21:05 2009'.
Following is the syntax for asctime() method:
This method returns a 24-character string of the following form: 'Tue Feb 17 23:21:05 2009'.
The following example shows the usage of asctime() method.
#!/usr/bin/python import time t = time.localtime() print "time.asctime(t): %s " % time.asctime(t)
When we run the above program, it produces the following result:
time.asctime(t): Tue Feb 17 09:42:58 2009
Here at Intellinuts, we have created a complete Python tutorial for Beginners to get started in Python.