So, say that I have a list of 250 distinct numbers. For task 1, I want to get all pairwise combinations (e.g. 1 & 2, 1 & 3, 1 & 4, 1 & 5....). And then output these in a list such as [1 2 1 3 1 4....] **P.S. if i include 1 & 2, I would not want to include 2 & 1 (same thing in this case).
For task 2, I want to do the same as above but now all triple combinations (e.g. 1 & 2 & 3, 1 & 2 & 4, 1 & 2 & 5, etc.....)
Then for task 3, I want to do quadruple combinations, and so on.
Is there a way to do this so that the only thing I would have to change for the function is the # of numbers per combination (e.g pair, triple, quadruple, etc.)?
Thanks.