在使用日历时,需要import calendar calendar.weekday(year,mon,day):根据年月日返回星期几,返回的值为0-6 calendar.day_name(n):输出星期几,如Monday