mirror of
https://github.com/micropython/micropython.git
synced 2026-01-04 19:20:22 +01:00
bytearray: Support bytearray(int) constructor.
To create bytearray of given length.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
print(bytearray(4))
|
||||
a = bytearray([1, 2, 200])
|
||||
print(a[0], a[2])
|
||||
print(a[-1])
|
||||
|
||||
Reference in New Issue
Block a user