Tools for Working with Lists : Array « Data Type « Python






Tools for Working with Lists


# The array module provides an array() object that stores only 
# homogenous data. 

from array import array

a = array('H', [4000, 10, 700, 22222])
sum(a)

a[1:3]
array('H', [10, 700])


           
       








Related examples in the same category