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