Looking for combinations for n elements from list of lists but choosing only one element from each list. E.g.
list = [[a, b], [c,d], [e,f,g,h,i], [j,k,l,m, n], [o,p]..]
While choosing no more than one element from each list, I am trying to come up with different combinations
e.g: for combination of n = 2 elements:
[a,c] [b,c], [c,j]...so on
for combination of n = 3 elements:
[a,c,e], [a,d,f]..so on
for combination of n = 4 elements:
[a, c, j, o], [a,c, i, p] ...
I tried using itertools combinations, but quickly running into issues. Any hints?