Open this example in the interactive library
Source code
from functools import reduce
from operator import mul
print(reduce(mul, [2, 3, 4], 1), reduce(mul, [], 1))Sample output
24 1

Reduce rows with an explicit starting value in Python.
Open this example in the interactive library
from functools import reduce
from operator import mul
print(reduce(mul, [2, 3, 4], 1), reduce(mul, [], 1))24 1