I am trying to get the possible combinations of a list consists of 4 elements e.g: ('E', 'J', 'M', 'Z')
, the condition to have for a valid combination is to change the positions of all 4 elements in every combination
Possible combinations are:
('J', 'E', 'Z', 'M')
('M', 'Z', 'E', 'J')
('Z', 'M', 'J', 'E').....
I tried itertools.permutations (('E', 'J', 'M', 'Z'), 4)
and the results are not satisfactory at all. can someone help please?