import time #1 print time.strftime("%m/%d/%Y %H:%M:%S") #2
How this works - Line by Line
import time #1
Imports the time module which is standard
print time.strftime("%m/%d/%Y %H:%M:%S") #2
Prints the date and time in "MM/DD/YYYY HH:MM:SS" format.
Note that the code is case sensitive.
No comments:
Post a Comment