The math.prod()
function is used to compute the product of all the numbers present in an iterable such as a list, tuple, dictionary, set, or any other user-defined iterable.
math.prod(iterable, start = 1)
The optional start
argument is used to initialize the product with the specified value; it defaults to 1.