I have multiple lists like so (Can be in any length and number):
['a1', 'a2']
['b1', 'b2', 'b3']
I can't figure out how to get all the possible combinations of these lists, wanted result:
[
['a1', 'b1'],
['a1', 'b2'],
['a1', 'b3'],
['a2', 'b1'],
['a2', 'b2'],
['a2', 'b3']
]
Does anyone have a suggestion for this (any language is fine)? I tried it using recursion but with no luck.