I have 3 python lists:
x = ["a", "b", "c"]
y = ["d", "e", "f"]
z = ["m", "n", "s"]
I want to generate all possible combinations of these 3 lists, regarding:
- each generated list's length should be 3,
- each generated list's items should be in order with x, y, z. I mean: "a", "d", and "m" can only occur in the first position of the generated list, "b", "e", "n" can only occur in 2nd pos, "c", "f", "s" can only occur in the 3rd pos.
I tried to do it with for loops, but it got too complicated. Is there a way to do it with tools like itertools, zip etc?