class MultiPass(object):

    def __init__(self, initfunc):
        self.initfunc = initfunc

def __iter__(self):
    return self.initfunc()
multiples_of_3 = MultiPass(lambda : (i * 3 for i in range(20)))
multiples_of_7 = MultiPass(lambda : (i * 7 for i in range(20)))
print(list((i, j) for i in multiples_of_3 for j in multiples_of_7))
Inconsistent behavior of python generators