mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 11:30:18 +00:00
...
This commit is contained in:
parent
839f766205
commit
399170727c
@ -36,4 +36,13 @@ def f():
|
||||
yield from g()
|
||||
|
||||
a = [i for i in f()]
|
||||
assert a == [1, 2, 3]
|
||||
assert a == [1, 2, 3]
|
||||
|
||||
def f(n):
|
||||
for i in range(n):
|
||||
yield i
|
||||
for j in range(i):
|
||||
yield j
|
||||
|
||||
t = f(3)
|
||||
assert list(t) == [0, 1, 0, 2, 0, 1]
|
Loading…
x
Reference in New Issue
Block a user