Hi!
I have a list consisting of other lists and some zeroes, for example:
x = [[1, 1, 2], [1, 1, 1, 2], [1, 1, 2], 0, 0, 0]
I would like to generate all the combinations of this list while keeping the order of the inner lists unchanged, so
[[1, 1, 2], 0, 0, [1, 1, 1, 2], [1, 1, 2], 0]
is fine, but
[[1, 1, 1, 2], [1, 1, 2], 0, 0, [1, 1, 2], 0]
isn't. I've got the feeling that this should be fairly easy in Python, but I just don't see it. Could somebody help me out?