I have a list of lists say
[[2, 4, 6], [2, 6, 10], [2, 12, 22], [4, 6, 8], [4, 8, 12], [6, 8, 10], [8, 10, 12], [8, 15, 22], [10, 11, 12]]
How do I generate a combination of the lists for a given length?
For example if the given length is 3
Then I need all combinations of 3 list element scenarios from the given list of list.
Example :
[2, 4, 6], [2, 6, 10], [2, 12, 22]
or
[2, 4, 6], [8, 10, 12], [10, 11, 12]
...
... and so forth
and if the given length is 2 then it should be like
[2, 4, 6], [2, 6, 10]
or
[6, 8, 10], [8, 10, 12]
...
... and so forth
I dont want a permutation of elements inside the lists but I want a permutation of the lists itself.