for i in range(digits, len(number)):
    x = int(number[i - digits])
y = int(number[i])
if x:
    product //= x
else:
    zeros -= 1
if y:
    product *= y
else:
    zeros += 1
if not zeros and product > result:
    result = product
return result
Largest product in a series in python