A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.w3schools.com/python/ref_math_prod.asp below:

Website Navigation


Python math.prod() Method

Python math.prod() Method

❮ Math Methods

Example

Return the product of the elements from the given iterable:

# Import math Library

import math

sequence = (2, 2, 2)

#Return the product of the elements

print(math.prod(sequence))

Try it Yourself » Definition and Usage

The math.prod() method returns the product of the elements from the given iterable.

Syntax

math.prod(iterable, start)

Parameter Values Parameter Description iterable Required. Specifies the elements of the iterable whose product is computed by the function start Optional. Specifies the starting value of the product. Default value is 1 Technical Details Return Value: The product of the elements from the iterable Python Version: 3.8

❮ Math Methods

Track your progress - it's free!


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4