For the list [1,2,3,4], I'm looking for the following for k = 2: [[1,2], [3,4]] [[1,3], [2,4]] [[1,4], [2,3]] for k = 3: [[1,2,3], [4]] [[1,2,4], [3]] [[1,3,4], [2]] [[2,3,4], [1]]