Reduce values
Section: Decorators and higher-order functions
Reduce values
python
python
from functools import reduce
product = reduce(lambda a, b: a * b, numbers, 1)Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Decorators and higher-order functions