Dec-11-2022, 06:29 AM
Hello.
The reference of math.module says about the prod function like this:
However, the help function shows like this:
At first, I thought prod is something like higher-order function, but it is not.
I tested to give * and / to it, but errors occur.
What do they mean?
Thanx.
The reference of math.module says about the prod function like this:
Quote: math.prod(iterable, *, start=1)
Calculate the product of all the elements in the input iterable. The default start value for the product is 1.
When the iterable is empty, return the start value. This function is intended specifically for use with numeric values and may reject non-numeric types.
However, the help function shows like this:
help(math.prod) Help on built-in function prod in module math: prod(iterable, /, *, start=1) Calculate the product of all the elements in the input iterable. The default start value for the product is 1. When the iterable is empty, return the start value. This function is intended specifically for use with numeric values and may reject non-numeric types.What do * and / mean in the argument list of prod?
At first, I thought prod is something like higher-order function, but it is not.
I tested to give * and / to it, but errors occur.
What do they mean?
Thanx.