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.
14 lines
207 B
14 lines
207 B
11 years ago
|
import array
|
||
|
|
||
|
a = array.array('B', [1, 2, 3])
|
||
|
print(a, len(a))
|
||
|
i = array.array('I', [1, 2, 3])
|
||
|
print(i, len(i))
|
||
|
print(a[0])
|
||
|
print(i[-1])
|
||
|
|
||
|
# Empty arrays
|
||
|
print(len(array.array('h')))
|
||
|
print(array.array('i'))
|
||
|
|