how many days in one year ?

contro opinion contropinion at gmail.com
Sun Apr 22 05:37:42 EDT 2012


i want to know how many days in one year,
import time
import datetime
d1= datetime.datetime(2003, 1, 1)
d2=datetime.datetime(2003, 21, 31)
print  (d2-d1).days+1

i can get there are 365 days in the 2003,

is there other way,better way  to calculate  ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20120422/e3349fd7/attachment.html>


More information about the Python-list mailing list