Project Euler Problem 8 - Largest product in a series
The easiest (but not computationally most efficient) way to solve this challenge is to use a brute-force algorithm, like you did. However you can write it a lot more succinctly when using more of the tools available in the Python standard library.


Use a generator expression to get all slices:

s = "..."
n = 13
slices = (s[i:i+n] for i in range(len(s) - n))
next(slices)
# '7316717653133'

map this string to an iterable of integers:

slices = (s[i:i+n] for i in range(len(s) - n))
list(map(int, next(slices)))
# [7, 3, 1, 6, 7, 1, 7, 6, 5, 3, 1, 3, 3]

Use functools.reduce and operator.mul to get the product of this iterable:

from functools import reduce
from operator import mul

slices = (s[i:i+n] for i in range(len(s) - n))
reduce(mul, map(int, next(slices)))
# 5000940

Use max to...get the maximum of those:

slices = (s[i:i+n] for i in range(len(s) - n))
max(reduce(mul, map(int, slice)) for slice in slices)

Finally, wrap the code in functions and the calling code in a if __name__ == "__main__": guard:

from functools import reduce
from operator import mul

def prod(x):
    return reduce(mul, x)

def maximum_product(s, n):
    return max(prod(map(int, s[i:i+n])) for i in range(len(s) - n))

if __name__ == "__main__":
    s = "..."
    n = 13
    print(max_product(s, n))