Historically, Guido vetoed the idea: http://bugs.python.org/issue1093

As noted in that issue, you can make your own:

Copyfrom functools import reduce # Valid in Python 2.6+, required in Python 3
import operator

reduce(operator.mul, (3, 4, 5), 1)
Answer from ojrac on Stack Overflow
Top answer
1 of 10
245

Historically, Guido vetoed the idea: http://bugs.python.org/issue1093

As noted in that issue, you can make your own:

Copyfrom functools import reduce # Valid in Python 2.6+, required in Python 3
import operator

reduce(operator.mul, (3, 4, 5), 1)
2 of 10
166

In Python 3.8, the prod function was added to the math module. See: math.prod().

Older info: Python 3.7 and prior

The function you're looking for would be called prod() or product() but Python doesn't have that function. So, you need to write your own (which is easy).

Pronouncement on prod()

Yes, that's right. Guido rejected the idea for a built-in prod() function because he thought it was rarely needed.

Alternative with reduce()

As you suggested, it is not hard to make your own using reduce() and operator.mul():

Copyfrom functools import reduce  # Required in Python 3
import operator
def prod(iterable):
    return reduce(operator.mul, iterable, 1)

>>> prod(range(1, 5))
24

Note, in Python 3, the reduce() function was moved to the functools module.

Specific case: Factorials

As a side note, the primary motivating use case for prod() is to compute factorials. We already have support for that in the math module:

Copy>>> import math

>>> math.factorial(10)
3628800

Alternative with logarithms

If your data consists of floats, you can compute a product using sum() with exponents and logarithms:

Copy>>> from math import log, exp

>>> data = [1.2, 1.5, 2.5, 0.9, 14.2, 3.8]
>>> exp(sum(map(log, data)))
218.53799999999993

>>> 1.2 * 1.5 * 2.5 * 0.9 * 14.2 * 3.8
218.53799999999998

Note, the use of log() requires that all the inputs are positive.

🌐
Invent with Python
inventwithpython.com › pythongently › exercise13
Exercise 13 - Sum & Product
The calculateSum() function adds these numbers and returns the sum while the calculateProduct() function multiplies these numbers and returns the product. If the list passed to calculateSum() is empty, the function returns 0. If the list passed to calculateProduct() is empty, the function returns ...
Discussions

Writing Code for Summation Formula with Given Variables
Using the formula it is pretty straight forward. First ask 3x for a user input. You don't have to print("Enter the Value of n:") before asking for input. Instead just use n = int(input("Enter the value of n: ")). When you have all 3 variables you can get the result by using the formula but you need to keep in mind that python does not understand 3n or 3(x+y) as multiplication. You explicitily need to use "*". So in your case: result = n / 2 * (2 * a + (n - 1) * d) Hope that helps :) More on reddit.com
🌐 r/learnpython
6
1
September 8, 2023
Python: multiply all elements in a list besides the one you are iterated on
look at the discussion here https://leetcode.com/problems/product-of-array-except-self/ More on reddit.com
🌐 r/leetcode
21
11
July 24, 2022
Multiplying in Python Without Using * - Help Please
Multiplication can be viewed as multiple additions, e.g: 3*5 is the same as 3+3+3+3+3. That’s essentially what the code does, it adds a to total variable b times and then checks if b is a positive or negative number. More on reddit.com
🌐 r/learnprogramming
22
1
July 5, 2021
Multiply two columns based on a condition in a Pandas Dataframe?
Use .loc and a filter / column list. filt=df[y] > 0 df.loc[filt, ['x']] = df[x] * df[y] More on reddit.com
🌐 r/learnpython
8
1
March 21, 2021
🌐
YouTube
youtube.com › how to fix your computer
PYTHON : What's the function like sum() but for multiplication? product()? - YouTube
PYTHON : What's the function like sum() but for multiplication? product()? [ Gift : Animated Search Engine : https://www.hows.tech/p/recommended.html ] PYTH...
Published   December 8, 2021
Views   82
🌐
Note.nkmk.me
note.nkmk.me › home › python
Cumulative Calculations in Python: itertools.accumulate() | note.nkmk.me
January 27, 2024 - In Python, the itertools.accumulate() function allows you to apply any function cumulatively. For example, it is used to calculate the cumulative sum and product of a list. itertools.accumulate() — P ...
🌐
Trymito
trymito.io › excel-to-python › functions › math › SUMPRODUCT
Excel to Python: SUMPRODUCT Function - A Complete Guide | Mito
Excel's SUMPRODUCT function multiplies corresponding components in given arrays and returns the sum of those products. This page explains how to use Excel's SUMPRODUCT function in Python using pandas.
🌐
w3resource
w3resource.com › python-exercises › python-functions-exercise-3.php
Python Exercise: Multiply all the numbers in a list - w3resource
July 12, 2025 - # Define a function named 'multiply' ... the 'numbers' list for x in numbers: # Multiply the current element 'x' with the 'total' total *= x # Return the final multiplication result stored in the 'total' variable return total # Print ...
🌐
GeeksforGeeks
geeksforgeeks.org › python-product-and-inter-summation-dictionary-values
Python - Product and Inter Summation dictionary values - GeeksforGeeks
April 13, 2023 - Method #1: Using zip() + map() + sum() + loop The combination of above functions can be used to solve this problem. In this, we perform the summation of values using sum(), the zip() binds all the values.
Find elsewhere
🌐
4Geeks
4geeks.com › lesson › working-with-functions-python
Working with Functions in Python
April 17, 2026 - All functions must start and end somewhere, that is called the scope of the function. You can delimit the boundaries by using the correct indentation after the colon : like this: ... 1def multiply(a, b): 2 my_variable = 'hello' 3 return a * b 4 5# This print won't work (it will trigger an error) because my_variable was 6# declared inside the function multiply; therefore, it is not available outside 7print(my_variable)
🌐
Real Python
realpython.com › python-sum-function
Python's sum(): The Pythonic Way to Sum Values – Real Python
July 21, 2023 - You can now use Python’s built-in function sum() to add multiple numeric values together. This function provides an efficient, readable, and Pythonic way to solve summation problems in your code.
🌐
Quora
quora.com › What-is-the-code-to-sum-the-multiplication-of-some-numbers
What is the code to sum the multiplication of some numbers? - Quora
July 3, 2018 - Answer (1 of 2): What is the code to sum the multiplication of numbers? There’s not a magic set of code to do this, and asking for someone else to do your homework won’t help you learn. Take a step back and see how you would do this problem by hand. If you have 50*80, you might add 50 together ...
🌐
GeeksforGeeks
geeksforgeeks.org › python-multiply-numbers-list-3-different-ways
Multiply All Numbers in the List in Python - GeeksforGeeks
Explanation: We start with res = 1 and then multiply each number in the list with res using a for loop. The math library in Python provides the prod() function to calculate the product of each element in an iterable.
Published   May 3, 2025
🌐
CodeGym
codegym.cc › java blog › learning python › multiply in python
Multiply in Python
August 14, 2024 - You can use map with a lambda function to multiply the elements, although it typically involves using reduce afterward to get the final product. from functools import reduce numbers = [2, 3, 4] result = reduce(lambda x, y: x * y, numbers) print(result) # Output: 24 · Did you know you can multiply lists in Python?
🌐
CodePal
codepal.ai › code generator › python function: sum and multiplication
Python Function: Sum and Multiplication - CodePal
June 17, 2023 - Parameters: numbers (list): A list ... be a list of 20 real numbers") # Calculate and return the sum and multiplication num_sum = sum(numbers) num_mult = 1 for num in numbers: num_mult *= num return (num_sum, num_mult) except TypeError ...
🌐
w3resource
w3resource.com › python-exercises › list › python-data-type-list-exercise-2.php
Python: Multiply all the items in a list - w3resource
June 28, 2025 - This function will be used to calculate ... line starts a loop that will iterate over each element in the items list, one at a time. tot *= x -> This line multiplies the current value of x by the tot variable....
🌐
EyeHunts
tutorial.eyehunts.com › home › write a python function to multiply all the numbers in a list | code
Write a Python function to multiply all the numbers in a list | Code
September 27, 2023 - The Python math module has math.prod() function, by using it you can write a Python function to multiply all the numbers in a list. Or you..
🌐
Django Central
djangocentral.com › python-program-to-multiply-two-numbers
Python Program To Multiply Two Numbers
Problem Definition Create a Python program to multiply two numbers. Program num_1 = 2 num_2 = 3 product = num_1 * num_2 prin
🌐
Quora
quora.com › How-do-you-multiply-two-variables-together-in-the-Python-programming-language
How to multiply two variables together in the Python programming language - Quora
Answer (1 of 4): There are a few ways. The easiest would be to write a print statement such as: print(5 * 7) (or whatever your numbers are to be multiplied, these are just examples.) The output will be 35 If you want variables that you can change and leave code in place to reuse, then write th...
🌐
DigitalOcean
digitalocean.com › community › tutorials › how-to-do-math-in-python-3-with-operators
How To Do Math in Python 3 with Operators | DigitalOcean
June 29, 2021 - If instead we would like to add the value 10 to 10, then multiply that sum by 5, we can use parentheses like we would in math: ... You may be familiar with another acronym for the order of operations, such as BEDMAS or BODMAS. Whatever acronym works best for you, try to keep it in mind when performing math operations in Python ...
🌐
Blogger
progressivepython.blogspot.com › 2018 › 11 › Math-Operations-Python-Sum-Sub-Division-Remainder-Exponentiation-Multiplication.html
Python Mathematical Operations - Addition (+), Subtraction (-), Multiplication (*), Division (/), Exponentiation (**) and Remainder (%) - Progressive Python
var1 = int( input("Type a integer:") ) var2 = int( input("Type another: ") ) sum = var1 + var2 print(soma) Cool, right? If you thought the subtraction symbol in Python was the -, congratulations, you are a serious candidate to win the next Nobel ...