Fix Python – What’s the function like sum() but for multiplication? product()?
Python’s sum() function returns the sum of numbers in an iterable.
sum([3,4,5]) == 3 + 4 + 5 == 12
I’m looking for the function that returns the product instead.
somelib.somefunc([3,4,5]) == 3 * 4 * 5 == 60
I’m pretty sure such a function exists, but I can’t find it.
….