Question: Input:

```
pos_1= 'AVNMHDRW' 
pos_2= 'KNTHDYBW'
pos_3= 'KVNGSDRB'

```

Trying to find all possible triplets using one item from pos\_1, one from pos\_2, and one from pos\_3

I'm trying to figure out how to use itertools.product(\*) but I'm a little confused

Ultimately, I want to create a list (or generator object) of all the different possibilities by taking one from pos\_1 then one from pos\_2 and then one from pos\_3

Example output:

```
'AKK','ANV','WWB'

```

pos\_1 stands for position one and so on for pos\_2 and pos\_3.

Answer: 
See this answer: [In python is ther a concise way to a list comprehension with multiple iterators](https://stackoverflow.com/questions/329886/in-python-is-there-a-concise-way-to-use-a-list-comprehension-with-multiple-iter).

In your case:

```
triples = [ a+b+c for a in pos_1 for b in pos_2 for c in pos_3 ]

```
You can make such generator using generator expression:

```
g = (v1+v2+v3  for v1 in pos_1 for v2 in pos_2 for v3 in pos_3)

```