micropython/tests/basics/for_return.py

8 wiersze
103 B
Python

# test returning from within a for loop
def f():
for i in [1, 2, 3]:
return i
print(f())