In the following code:
a = [["2022"], ["2023"]]
b = [["blue", "red"], ["green", "yellow"]]
c = [["1", "2", "3"], ["4", "5", "6", "7"], ["8", "9", "10", "11"], ["12", "13"]]
I would like a function that outputs this, but for any number of variables:
[
["2022", "blue", "1"],
["2022", "blue", "2"],
["2022", "blue", "3"],
["2022", "red", "4"],
["2022", "red", "5"],
["2022", "red", "6"],
["2022", "red", "7"],
["2023", "green", "8"],
["2023", "green", "9"],
["2023", "green", "10"],
["2023", "green", "11"],
["2023", "yellow", "12"],
["2023", "yellow", "13"],
]
I have searched for a function to do this with itertools or zip, but haven't found anything yet.
To clarify, my use case for this was to iterate through values of a nested/multi-level dropdown menu (the first dropdown returns options, and each option returns a different dropdown, and so on).