import calendar calendar.monthrange(2019,5) 输出结果:(2, 31) 解析: 这里使用了函数 calendar.monthrange(year,month),该函数返回两个整数: 第一个整数是该月首日所在的星期的日期码(0-6); 第二个...