hi,
I am trying to do some aombination study. I have saw some codes on permutations and combinations.
But for all those programs input is a single list. I am trying to make combination from 4 lists.
I have input 4 lists. Now I want to generate several combination lists. Example output is given below
Hope some one can help me to generate such output. Thanks in advance.
Input Lists:
list1 = [1,2]
list2 = [A,B,C]
list3 = [X,Y]
list4 = [M,N,O]
Output Combination lists:
[1,A,X,M]
[1,A,X,N]
[1,A,X,O]
[1,A,Y,M]
[1,A,Y,N]
[1,A,Y,O]
[1,B,X,M]
[1,B,X,N]
[1,B,X,O]
[1,B,Y,M]
[1,B,Y,N]
[1,B,Y,O]
[1,c,X,M]
[1,c,X,N]
[1,c,X,O]
[1,c,Y,M]
[1,c,Y,N]
[1,c,Y,O]
[2,A,X,M]
[2,A,X,N]
[2,A,X,O]
[2,A,Y,M]
[2,A,Y,N]
[2,A,Y,O]
[2,B,X,M]
[2,B,X,N]
[2,B,X,O]
[2,B,Y,M]
[2,B,Y,N]
[2,B,Y,O]
[2,c,X,M]
[2,c,X,N]
[2,c,X,O]
[2,c,Y,M]
[2,c,Y,N]
[2,c,Y,O]
Best regards,
Sriram