i have a list of of 53 element each element is a tuple e.g.
list = [(1,1) , (2,2) ,(3,3) ,(4,4) ,(5,5) ,(6,6) ,(7,7) ,(8,8) ,(9,9) ,(10 ,10) , ...(53,53)]
what i wanna do is to create sub-lists that contain 9 elements each of all possible combinations . but the elements in each sub-list must be unique e.g.
[[(1,1) ,(2,2) ,(3,3) ,(29,29) , (35,35) ,(40,40) ,(45,45),(50,50),(52,52)] ,[(2,2) ,(6,6) ,(3,3) ,(9,9) , (20,20) ,(25,25) ,(35,35) ,(40,40),(43,43) ] , [(3,3),(5,5),(7,7) ,(10,10) ,(25,25) ,(35,35) , (40,40),(43,43) ,(45,45)] , ...]
i tried using itertools combinations like shown below :
combination = []
for combo in itertools.combinations(list, 9) :
combination.append(combo)
but the program keeps crashing . so is there any other way to do it ?