The following Code:
def test(x):
for i in x:
yield i
i = list(i)
i[1] = "X"
yield tuple(i)
list(test(it.product(["A", "B"], ["C"])))
Outputs the following list:
[( A , C ), ( A , X ), ( B , C ), ( B , X )]
How would I adapt the function such that the input generator results are listed first and then the results of the translation?
So:
[( A , C ), ( B , C ), ( A , X ), ( B , X )]