mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 11:30:18 +00:00
Update _listcomp.py
This commit is contained in:
parent
197e440844
commit
0e56b25b0d
@ -27,4 +27,11 @@ assert a == '1234'
|
|||||||
|
|
||||||
assert reversed([]) == []
|
assert reversed([]) == []
|
||||||
assert reversed('') == []
|
assert reversed('') == []
|
||||||
assert reversed('测试') == ['试', '测']
|
assert reversed('测试') == ['试', '测']
|
||||||
|
|
||||||
|
a = [
|
||||||
|
[(i,j) for j in range(10) if j % 2 == 0]
|
||||||
|
for i in range(10) if i % 2 == 1
|
||||||
|
]
|
||||||
|
|
||||||
|
assert a == [[(1, 0), (1, 2), (1, 4), (1, 6), (1, 8)], [(3, 0), (3, 2), (3, 4), (3, 6), (3, 8)], [(5, 0), (5, 2), (5, 4), (5, 6), (5, 8)], [(7, 0), (7, 2), (7, 4), (7, 6), (7, 8)], [(9, 0), (9, 2), (9, 4), (9, 6), (9, 8)]]
|
Loading…
x
Reference in New Issue
Block a user