You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
173 B
15 lines
173 B
10 years ago
|
# test bytearray + bytearray
|
||
|
|
||
|
b = bytearray(2)
|
||
|
b[0] = 1
|
||
|
b[1] = 2
|
||
|
print(b + bytearray(2))
|
||
|
|
||
|
# inplace add
|
||
|
b += bytearray(3)
|
||
|
print(b)
|
||
|
|
||
|
# extend
|
||
|
b.extend(bytearray(4))
|
||
|
print(b)
|