def days(months, day): month_by_days = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334] return month_by_days[int(months) - 1] + int(day)
def days(month, day):months=[28 if x==2 else 31 if ((x<8 and x%2!=0) or (x>7 and x%2==0)) else 30 for x in range(1,13)]return sum(months[0:month-1])+day- def days(months, day):
- month_by_days = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334]
- return month_by_days[int(months) - 1] + int(day)