In brief
array.array uses a type code to constrain the basic values it stores. For example, array('i', [1, 2, 3]) holds integers rather than arbitrary objects.
Useful to know
array.array uses a type code to constrain the basic values it stores. For example, array('i', [1, 2, 3]) holds integers rather than arbitrary objects. [1]
This helps with compact numeric data. Some type sizes depend on the platform, so check itemsize. For a binary interchange protocol, do not automatically treat native representation as a shared standard across different systems.
Sources
For further detail and to check the information: