micropython/tests/basics/generator2.py

4 wiersze
56 B
Python

gen = (i for i in range(10))
for i in gen:
print(i)