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 UsageThe math.prod()
method returns the product of the elements from the given iterable.
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.8Track 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