def combinations(n, k): ''' Returns the number of ways you can choose k items out of n if order does not matter Parameters: ---------- n: (int) k: (int) Returns: ---------- Returns the number of combinations of k items out of n. ''' import math combs = math.factorial(n)/(math.factorial(k)*math.factorial(n-k)) return combs