2014-03-30 16:14:55 -04:00
|
|
|
def gen():
|
|
|
|
yield from (1, 2, 3)
|
|
|
|
|
|
|
|
def gen2():
|
|
|
|
yield from gen()
|
|
|
|
|
2015-05-09 17:41:34 -04:00
|
|
|
def gen3():
|
|
|
|
yield from (4, 5)
|
|
|
|
yield 6
|
|
|
|
|
2014-03-30 16:14:55 -04:00
|
|
|
print(list(gen()))
|
|
|
|
print(list(gen2()))
|
2015-05-09 17:41:34 -04:00
|
|
|
print(list(gen3()))
|