hope you can help me think of a solution to this problem
I would like to get all the possible combinations between the elements of different lists or arrays
lets say I have
L1 = [A,B] and
L2 = [C,D]
if I somehow use itertool.combinantion for python to look for the combination for two elements the results would be {AB,AC,AD,BC,BD,BC}, the issue here is that I just need {AC,AD,BC,BD} because they are elements from different lists, is there a conditional or something that could help me get combinations of n elements from different lists?
hope I made myself clear enough, I am relatively new to coding,
thanks in advance,
Appreciate every response
>Solution :
Perhaps itertools.product:
>>> from itertools import product
>>> L1 = ['A', 'B']
>>> L2 = ['C', 'D']
>>> list(product(L1, L2))
[('A', 'C'), ('A', 'D'), ('B', 'C'), ('B', 'D')]