Let's assume I have list a:
a = [0, 0, [0, 1], [0, 1, 2]]
where a can be of any length, and its constituents can be of any length and I want to generate a new list that can be any combination of the values such that for the given example I would return:
b = [[0,0,0,0],
[0,0,0,1],
[0,0,0,2],
[0,0,1,0],
[0,0,1,1],
[0,0,1,2]]
I think it's just a matter of looping, but I would appreciate any help.
Thanks