Add bytearray basic tests.
This commit is contained in:
parent
09ce05996a
commit
d30e019459
|
@ -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)
|
Loading…
Reference in New Issue