The following never prints anything in Python 3.6
from itertools import product, count for f in product(count(), [1,2]): print(f)
Ins
I found that
for tup in ((x,y) for x in count() for y in [1,2]): print(tup)
does what I expect. This is odd given that it is listed as equivelent in the docs. This seems like a bug in itertools.product, but it seems unlikely given how standard it is.
itertools.product