The problem is to build extended lists out of using two same length lists. for example, there is
qq=['a','b','c']
ww=['d','e','f']
my_function(qq,ww)
#I want to see output like:
output = [['a','b','c'],['a','b','f'],['a','e','c'],['a','e','f'],['d','e','f'],['d','e','c'],['d','b','f'],['d','b','c']]
all the combinations of making the same length list with a constraint of:
- if a is chosen then d cannot be chosen, same logic,
- if b is chosen then e cannot be chosen,
- if c is chosen then f cannot be chosen.
The important thing is the elements' position in the list.
so the function takes two same length list of strings. and returns the list of the combinations. How should I write this?