I am trying to select all possible sub-arrays of an array of length n which have k elements. I have just started with Python and not sure how to start with it. 
I know there will be nCk (n choose k)  but don't know how to start. Could anyone please give me a hint or a method I could use?
$$\frac{n!}{(n-k)!k!$$