Monday, June 9, 2014

Day 65

Explored Python at CodeCademy. Worked on Python tutorial 3 of 6, Date and Time, Extracting Information. Learned how to print individual parts of the date and time instead of the entire thing.

The code used:
from datetime import datetime
now = datetime.now()
print now.year
print now.month
print now.day

The interaction looked like this:
2014
6
9

No comments:

Post a Comment