(year, month)
return day1, ndays
Return weekday (0-6 ~ Mon-Sun) and number of days (28-31) for
       year, month.
Return weekday (0-6 ~ Mon-Sun) and number of days (28-31) for
       year, month.
Return weekday ( 0 - 6 ~ Mon - Sun ) and number of days ( 28 - 31 ) for year month .
def monthrange(year, month):
    """Return weekday (0-6 ~ Mon-Sun) and number of days (28-31) for
       year, month."""
    if not 1 <= month <= 12:
        raise IllegalMonthError(month)
    day1 = weekday(year, month, 1)
    ndays = mdays[month] + (month == February and isleap(year))
    return day1, ndays
def monthrange ( year , month ) : if not 1 <= month <= 12 : raise IllegalMonthError ( month ) day1 = weekday ( year , month , 1 ) ndays = mdays [ month ] + ( month == February and isleap ( year ) ) return day1 , ndays