PyDocs

Nav

Numeric and Mathematical Modules

comb

math.integer

function
  • comb(n, k, /)
Number of ways to choose k items from n items without repetition and without order.

Evaluates to n! / (k! * (n - k)!) when k <= n and evaluates
to zero when k > n.

Also called the binomial coefficient because it is equivalent
to the coefficient of k-th term in polynomial expansion of the
expression (1 + x)**n.

Raises ValueError if either of the arguments are negative.
0 Examples
No examples for math.integer/comb.
See Also
No see-alsos for math.integer/comb
0 Notes
No notes for comb