I want to find the permutation of list of list of lists For example: my input
x = [[[1,2,3],[5,6,7]],[[8,9,10],[11,12]]]
Required output should be:
[[[1,2,3],[8,9,10]],[[1,2,3],[11,12]],[[5,6,7],[8,9,10]],[[5,6,7],[11,12]]]
As you can see I want the innermost list to be intact and need to have that considered as an element and then do combinations.
I tried permutations(array) in itertools. But it didn't work.
Any help is highly appreciated.
Thank you.