Wednesday, June 11, 2014

Day 67

Explored Python at CodeCademy. Worked on Python tutorial 5 of 6, Date and Time, Pretty Time. Learned how to print time in a specific format.

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

The interaction looked like this:
3:43:4

No comments:

Post a Comment