import math def num_combinations(n, k): """Calculates the number of combinations of k out of n objects. """ return math.factorial(n)/math.factorial(k)/math.factorial(n-k)
Probability
原文:https://www.cnblogs.com/rose999/p/14792152.html