Fix Python – Statistics: combinations in Python

I need to compute combinatorials (nCr) in Python but cannot find the function to do that in math, numpy or stat libraries. Something like a function of the type:
comb = calculate_combinations(n, r)

I need the number of possible combinations, not the actual combinations, so itertools.combinations does not interest me.
Finally, I want to avoid usi….

Fix Python – How to get all possible combinations of a list’s elements?

I have a list with 15 numbers in, and I need to write some code that produces all 32,768 combinations of those numbers.
I’ve found some code (by Googling) that apparently does what I’m looking for, but I found the code fairly opaque and am wary of using it. Plus I have a feeling there must be a more elegant solution.
The only thing that occurs to….