You've already forked Core2forAWS-MicroPython
mirror of
https://github.com/m5stack/Core2forAWS-MicroPython.git
synced 2026-05-20 10:30:31 -07:00
Add bytearray basic tests.
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
a = bytearray([1, 2, 200])
|
||||
print(a[0], a[2])
|
||||
print(a[-1])
|
||||
a[2] = 255
|
||||
print(a[-1])
|
||||
a.append(10)
|
||||
print(len(a))
|
||||
|
||||
s = 0
|
||||
for i in a:
|
||||
s += i
|
||||
print(s)
|
||||
Reference in New Issue
Block a user