If not, what are the differences
Python list vs. array – when to use? - Stack Overflow
What is the difference between an array and a list?
Are arrays and lists essentially the same?
What's the difference between Array and List?
In the computer science sense an Array is any container that holds elements in memory and allows those elements to be accessed by their index.
A List is by definition an Array, but any given Array is not a List. A List is made by augmenting an Array to allow for variable-width data types.
In other words the Array is the more fundamental data type ... from Arrays you build Lists (and Dicts and Queues and Deques, and indeed most other higher-order data types).
In Python an array.array is a 1-dimensional linear array; it is variable length (so it doesn't necessarily pack data together in memory), but it can only hold data of one fixed-size type, and so cannot hold other containers (for instance other array.arrays). This constraint enables the interpreter to efficiently allocate memory, as whenever you're going to grow the array substantially it needs to only pre-allocate space for more of a known-width data type. So, if you know your data type ahead of time, using an array.array can be quite a bit more memory efficient.
Contrast that with Python's list, which is variable width but can also hold variable-width data types, and can also therefore contain N-dimensions (ie you can make lists of lists). This is much less memory-efficient, as the interpreter needs to pre-allocate quite a bit of memory to allow it to grow performantly.
Then there's numpy which provides efficiently packed N-dimensional array and matrix types... but that's going beyond the scope of your question.
More on reddit.comHow do you convert a Python list to an array?
Are there other array-like data structures in Python?
Can a Python list contain an array?
Videos
Basically, Python lists are very flexible and can hold completely heterogeneous, arbitrary data, and they can be appended to very efficiently, in amortized constant time. If you need to shrink and grow your list time-efficiently and without hassle, they are the way to go. But they use a lot more space than C arrays, in part because each item in the list requires the construction of an individual Python object, even for data that could be represented with simple C types (e.g. float or uint64_t).
The array.array type, on the other hand, is just a thin wrapper on C arrays. It can hold only homogeneous data (that is to say, all of the same type) and so it uses only sizeof(one object) * length bytes of memory. Mostly, you should use it when you need to expose a C array to an extension or a system call (for example, ioctl or fctnl).
array.array is also a reasonable way to represent a mutable string in Python 2.x (array('B', bytes)). However, Python 2.6+ and 3.x offer a mutable byte string as bytearray.
However, if you want to do math on a homogeneous array of numeric data, then you're much better off using NumPy, which can automatically vectorize operations on complex multi-dimensional arrays.
To make a long story short: array.array is useful when you need a homogeneous C array of data for reasons other than doing math.
For almost all cases the normal list is the right choice. The arrays module is more like a thin wrapper over C arrays, which give you kind of strongly typed containers (see docs), with access to more C-like types such as signed/unsigned short or double, which are not part of the built-in types. I'd say use the arrays module only if you really need it, in all other cases stick with lists.