Codewars | Python | Range Extraction | part 8