micropython/tests/basics/array1.py
Damien George b40892d266 Rename array test to array1 so it doesn't clash with array module.
On my machine, 'import array' in CPython tries to load the array test.
2014-01-28 23:12:35 +00:00

14 lines
207 B
Python

import array
a = array.array('B', [1, 2, 3])
print(a, len(a))
i = array.array('I', [1, 2, 3])
print(i, len(i))
print(a[0])
print(i[-1])
# Empty arrays
print(len(array.array('h')))
print(array.array('i'))