# 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])