Этот код произведет некоторый вывод
def test(): for i in range(10): x = yield i t = test() for i in test(): print i