math more with lists and arrays sparse lists , , , , list of integers requires several hundred terabytes of storagefar more than most hard drives can store howeverin many practical applicationsmost of the entries of list are this allows us to save lot of memory by just storing the nonzero values along with their locations we can do this using dictionary whose keys are the locations of the nonzero elements and whose values are the values stored in the array at those locations for examplesuppose we have two-dimensional list whose entries are all zero except that [ ][ is and [ ][ is here is the dictionary that we would used {( , ) ( , ) the array module python has module called array that defines an array object that behaves lot like listexcept that its elements must all be the same type the benefit of array over lists is more efficient memory usage and faster performance see the python documentation [ for more about arrays the numpy and scipy libraries if you have any serious mathematical or scientific calculations to do on arraysyou may want to consider the numpy library it is easy to download and install from the numpy user' guidenumpy is the fundamental package for scientific computing in python it is python library that provides multidimensional array objectvarious derived objects (such as masked arrays and matrices)and an assortment of routines for fast operations on arraysincluding mathematicallogicalshape manipulationsortingselectingi/odiscrete fourier transformsbasic linear algebrabasic statistical operationsrandom simulation and much more there is also scipywhich builds off of numpy this time from the scipy user' guidescipy is collection of mathematical algorithms and convenience functions built on the numpy extension for python it adds significant power to the interactive python session by exposing the user to high-level commands and classes for the manipulation and visualization of data with scipyan interactive python session becomes data-processing and system-prototyping environment rivaling sytems such as matlabidloctaver-laband scilab random numbers how python generates random numbers the random number generator that python uses is called the mersenne twister it is reliable and well-tested it is deterministic generatormeaning