python nCr n choose r function

38

python nCr n choose r function -

# Basic syntax:
from math import comb
comb(n, r) # calculates "n choose r" aka nCr aka binomial coefficients

Comments

Submit
0 Comments