I was trying to convert the itertools.product() python's fonction to C code:
def product(*args, repeat=1):
pools = [tuple(pool) for pool in args] * repeat
result = [[]]
for pool in pools:
result = [x+[y] for x in result for y in pool]
for prod in result:
yield tuple(prod)
to C code, but I didn't understand this particular instruction:
result = [x+[y] for x in result for y in pool]
could anyone explain it for me ? thank's