circuitpython/tests/basics/generator2.py

4 lines
56 B
Python

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