If there are n digits in a series and the span is exactly n, I’d think the largest product is simply the product of these n digits. If so, the error message
span must be smaller than string length
seems inaccurate. It should be:
span must be smaller than or equal to string length
@Isaac - The exception messages on the Python track are not in the least arbitrary for practice exercises. They’re pulled directly from problem specifications, and are checked to match.
Ah. I missed that and ought to have realized that. My apologies.
Exception messages in the specs and in general are somewhat arbitrary. They typically are copy/pasted from the unit tests (from the file or from the test output).