Thursday, June 12, 2014

Day 68

Explored Python at CodeCademy. Worked on Python tutorial 6 of 6, Date and Time, Grand Finale. Finished course by printing the date and time separately in a specific format.

The code used:
from datetime import datetime
now =
print '%s/%s/%s %s:%s:%s' % (now.month,, now.year, now.hour, now.minute, now.second)

The interaction looked like this:
6/13/2014 2:32:25

No comments:

Post a Comment