輸入某年某月某日,判斷這一天是這一年的第幾天?

import calendar from functools import reduce year=2015 month=6 day=7 months=[31,28,31,30,31,30,31,31,30,31,30,31] sum=reduce((lambda x,y:x+y),months[0:month-1]) if calendar.isleap(year) and month>2:
相關文章
相關標籤/搜索