3.5. Types Array

  • array.array() is a type that represents an array of elements of the same type.

  • It is part of the built-in array module in Python.

3.5.1. Example

>>> from array import array
>>>
>>> data = array('b', [1, 2, 3, 4, 5])
>>> print(data)
array('b', [1, 2, 3, 4, 5])