Here's one way to solve the problem:
main.py352 chars13 lines
Explanation:
len(number) - num_digits
since we want to be able to obtain the full range of num_digits
from each starting index.num_digits
adjacent digits using another loop and multiplying them together.max_product
and update it if it's greater.max_product
.Note: The input number is assumed to be stored as a string.
gistlibby LogSnag