Efficiency on Project Euler Problem #8
The loop iterates over the whole range(len(M)). It means that the last few products exercise less than 13 digits. It doesn't matter in this particular example (they are all zeros anyway), but may lead to erroneous result in general case. Iterate over range(len(M) - 13).
Digit-to-int conversion happens 13 times for each digit. Better convert them once in a separate loop before doing calculations.
Every time a 0 is encountered, you may safely skip the whole bunch of digits: the product will be 0 anyway.
A sliding window technique may help.


In pseudocode:

product *= data[head]
product /= data[tail]
head += 1
tail += 1


(be careful to not divide by 0).