easy +10 pts

Business days between

Count weekdays between two dates, inclusive of both endpoints.

Implement the function `business_days_between(start: str, end: str) -> int` that takes two date strings in `YYYY-MM-DD` format and returns the number of business days (Monday through Friday) from `start` to `end`, inclusive. The input dates are valid and `start <= end`. The result should be a non-negative integer.

Constraints

- Input dates are given as strings in `YYYY-MM-DD` format. - `start <= end` always holds. - Dates are valid calendar dates (e.g., no February 30). - You can use the `datetime` module from the standard library.

Example

```python
>>> business_days_between('2024-01-01', '2024-01-01')
1
>>> business_days_between('2024-01-06', '2024-01-07')  # Saturday to Sunday
0
>>> business_days_between('2024-01-05', '2024-01-08')  # Fri to Mon
2
```
10 points ~15 min

Recent Submissions

No submissions yet — hit Run Tests to try!

Hints

Convert the date strings to `date` objects and use `date.toordinal()` or iterate over days.
Remember that `date.weekday()` returns 0 for Monday, 5 for Saturday, 6 for Sunday.
For inclusive counting, you can use a loop or a formula with `timedelta(days=1)`.
Python 3
All tests passed!
Test Results
Press Ctrl+Enter or click Run Tests to execute your code.