Python time scheme ctime() changes a time stateed in seconds since the era to a string in place of local time. If secs is not offered or None, the present time as revisited by time() is utilized. This purpose is corresponding to asctime(localtime(secs)). Locale information is not used by ctime().
Following is the syntax for ctime() method −
time.ctime([ sec ])
This method does not return any value.
The following example shows the usage of ctime() method.
print "time.ctime() : %s" % time.ctime()
When we run above program, it produces following result:
time.ctime() : Tue Feb 17 10:00:18 2009
Here at Intellinuts, we have created a complete Python tutorial for Beginners to get started in Python.