1.4 Extracting information


rom datetime import datetime
now = datetime.now()
print datetime.now()
now = now.year
print now.year
print now.month
print now.day

Isn't working giving error code

Traceback (most recent call last):
File "python", line 5, in
AttributeError: 'int' object has no attribute 'year'


Check if you are not missing f in the first word, it should be 'from'.
Also remove this part

In this part you have assigned a year to variable now and later you are trying to print month from something what only have a year.
Remove it and check if it works.