circuitpython/tests/pybnative/for.py

20 lines
173 B
Python
Raw Normal View History

import pyb
2021-03-15 09:57:36 -04:00
@micropython.native
def f1(n):
for i in range(n):
print(i)
2021-03-15 09:57:36 -04:00
f1(4)
2021-03-15 09:57:36 -04:00
@micropython.native
def f2(r):
for i in r:
print(i)
2021-03-15 09:57:36 -04:00
f2(range(4))