The class wrote birthdays as "month-day", like "03-21". Write by_month(birthdays) to count how many birthdays fall in each month, returning {month: count} with the month as a number (3, not "03").
by_month(["03-21", "11-02", "03-05"])→{3: 2, 11: 1}by_month([])→{}def by_month(birthdays):
counts = {}
for day in birthdays:
# your code here: take the month out of day as a number (instead of month = 0)
month = 0
counts[month] = counts.get(month, 0) + 1
return counts
Run tries the examples. When they look right, Submit.