Skip to content

Commit

Permalink
Add bytearray basic tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
pfalcon committed Jan 21, 2014
1 parent 09ce059 commit d30e019
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/basics/bytearray1.py
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit d30e019

Please sign in to comment.