Is there a built-in product() in Python? [duplicate]
Pronouncement Yes, that’s right. Guido rejected the idea for a built-in prod() function because he thought it was rarely needed. Python 3.8 Update In Python 3.8, prod() was added to the math module: >>> from math import prod >>> prod(range(1, 11)) 3628800 Alternative with reduce() As you suggested, it is not hard to make your … Read more