`max_day, _ = calendar...` would be more pythonic (remove the `[1]`)