I want to create a function to take one number from each list and create possible combinations of the numbers. I don't know how many lists will appear every time... For example:
Getting 4 lists: x1, x2, x3 and x4, I need to get output:
(x1[0], x1[0], x1[0], x1[0]), (x1[0], x1[0], x1[0], x1[1]), (x1[0], x1[0], x1[0], x1[2])... or in any other format.
I know how to get it from specific amount of lists using for loop:
for i in range(len(x1)):
for j in range(len(x2)):
etc ...
but how may I get it when the number of lists is random?
Thanks