The following list is given [[1, 2, 3], [4, 2, 5, 6], [7, 2, 5], [8, 9, 10]]
. How can I get all combinations of lists that hold all the combinations of the sublists? The order of the lists in the list does not matter.
For example, here we have two of them: [[1, 3, 2], [4, 2, 5, 6], [7, 2, 5], [8, 9, 10]]
, [[2, 1, 3], [4, 2, 5, 6], [7, 2, 5], [8, 9, 10]]
etc.
I have stumbled across very similar questions and suitable answers:
All combinations of a list of lists
How to get all possible combinations of a list’s elements?
But none of them solved this particular problem.