Product of a list python

Viewed 23255

Possible Duplicate:
Returning the product of a list

Is there any other way to get the product of a list, than this way:

def prod(L):
 p=1
 for i in L:
   p= i * p
 return p

This code is correct, but I need to find another way to do it. And I really can't find it.

4 Answers
Related