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