circuitpython/tests/basics/array_micropython.py

13 lines
198 B
Python
Raw Normal View History

# test MicroPython-specific features of array.array
import array
# arrays of objects
a = array.array('O')
a.append(1)
print(a[0])
# arrays of pointers
a = array.array('P')
a.append(1)
print(a[0])