DATE AND TIME

Desciption:

I learned how to use variable and strings in order to complete the date and time lab.

Code:

from datetime import datetime
now = datetime.now()

print ‘%s/%s/%s %s:%s:%s’ % (now.month, now.day, now.year, now.hour, now.minute, now.second)

 

screenshot:

vic

 

Leave a Reply

Your email address will not be published. Required fields are marked *