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.

Answer from Dan Lenski on Stack Overflow
🌐
GeeksforGeeks
geeksforgeeks.org › python › difference-between-list-and-array-in-python
Difference between List and Array in Python - GeeksforGeeks
January 14, 2026 - The first element of the list is ... of characters. ... An array is a data structure that stores elements of the same data type in contiguous memory locations, making it efficient for numerical operations....
Discussions

What is the difference between an array and a list?
Hi I need to know the difference between an array and a list More on discuss.python.org
🌐 discuss.python.org
2
0
January 15, 2021
Are arrays and lists essentially the same?
“Array” is an ambiguous term in Python and best not used. Most beginners use it to refer to the list type, but are unaware that there is actually an array.array type in the standard library as well. More on reddit.com
🌐 r/learnpython
41
32
May 7, 2022
What is the difference between a Tuple, List, and Array? When and why to use each one.
Array: contiguous in memory (so each element is one after the other). fixed sized. very space efficient. very efficient to iterate over and access random elements. not efficient to insert something new in the middle of it, or to delete something. dynamic arrays (vectors, arraylist, etc) can be efficiently resized, and are the preferred data structure for lists unless you have a reason not to use them. (Linked) list: not continuous in memory. each node of the list contains data and a pointer/reference to the next element (and maybe a pointer to the previous). fairly efficient to iterate over. inefficient to access a random element, but efficient to access to first (and maybe last) element, efficient to add an element after (and maybe before) another, or remove an element. very efficient to merge and splice. tuple: completely different. tuples (or product types) do not represent a list of data. They are an object with a fixed dimension and each coordinate contains a particular type of data (in linked lists and arrays data is homogenous; in tuples it's often not). More on reddit.com
🌐 r/learnprogramming
8
2
August 17, 2015
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.com
🌐 r/learnpython
15
10
December 29, 2017
People also ask

What is the difference between an array and an ArrayList?
While comparing array vs list, an array is fixed in size and holds data types that are similar in nature, whereas an ArrayList, which is common in the case of Java, can resize dynamically, like a list in Python example. In the case of array vs list Python, the list in Python acts in the same manner as an ArrayList by resizing dynamically.
🌐
jaroeducation.com
jaroeducation.com › home › blog › difference between arrays and list
Array vs List in Python: Differences, Uses & Examples
What are arrays in Python?
In Python, an array is a data structure that stores a list of elements of the same kind in a contiguous manner. For a comparison between array and list in terms of their usage, an array in Python is used when a mathematical operation has to be performed.
🌐
jaroeducation.com
jaroeducation.com › home › blog › difference between arrays and list
Array vs List in Python: Differences, Uses & Examples
What is the difference between array and list in Python?
The primary difference between array and list in Python is that the elements in the array are of the same data type, but in the case of a list, the data types can be different. Arrays in the context of array vs list in Python are more memory-efficient than lists.
🌐
jaroeducation.com
jaroeducation.com › home › blog › difference between arrays and list
Array vs List in Python: Differences, Uses & Examples
Top answer
1 of 11
528

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.

2 of 11
78

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.

🌐
LearnPython.com
learnpython.com › blog › python-array-vs-list
Array vs. List in Python – What's the Difference? | LearnPython.com
Arrays need to be declared. Lists don't, since they are built into Python. In the examples above, you saw that lists are created by simply enclosing a sequence of elements into square brackets. Creating an array, on the other hand, requires a specific function from either the array module (i.e., array.array()) or NumPy package (i.e., numpy.array()).
🌐
Upgrad
upgrad.com › home › blog › data science › difference between array and list in python: key uses & benefits
Difference Between Array and List: Python's Data Duel
July 7, 2026 - This fundamental distinction leads to several other important points when considering array vs list. Let's break them down in a table for a quick overview. Let's look at this with a simple code example. A Python list can happily store an integer, a string, and a float all at once:
Find elsewhere
🌐
Jaro Education
jaroeducation.com › home › blog › difference between arrays and list
Array vs List in Python: Differences, Uses & Examples
5 days ago - In the case of array vs list Python, the list in Python acts in the same manner as an ArrayList by resizing dynamically. In array vs list in Python, arrays are preferred for their efficiency in operations involving large numerical arrays, while lists are preferred for their programming applications.
🌐
Wscube Tech
wscubetech.com › home › difference between list and array in python (with example)
Difference Between List and Array in Python (With Example)
July 14, 2026 - The closest equivalent to ArrayList in Python is a list that refers to an ordered collection of elements. A list can contain duplicate elements. A set is an unordered collection of unique elements that automatically removes a duplicate element.
🌐
Vista Academy
thevistaacademy.com › home › blog › python array vs list: key differences and when to use each [2025 updated]
Python Array vs List: Key Differences and When to Use Each [2025 Updated]
August 21, 2025 - List: append amortized O(1), insert/delete O(n), index O(1). Array(NumPy): vector ops O(n) in C, very fast. Python’s nearest equivalent of Java’s ArrayList is the built-in list.
🌐
Codedamn
codedamn.com › news › python
What is the difference between an array and a list in Python?
November 7, 2022 - Lists can be accessed without any external dependencies whereas arrays require external dependencies. Lists are used to store multiple items in a single variable. They can store items belonging to primary data types besides list, tuple, set, ...
🌐
Scaler
scaler.com › home › topics › what is the difference between array and list in python?
What is the Difference Between Array and List in Python? - Scaler Topics
March 31, 2024 - We can only store elements of the same types in the array. Lists are the inbuilt data structure of python.
🌐
Javatpoint
javatpoint.com › python-array-vs-list
Python Array vs. List - Javatpoint
Return the Scaled Companion Matrix of a 1-D Array of Chebyshev Series Coefficients using NumPy in Python
🌐
PyTutorial
pytutorial.com › python-array-vs-list-key-differences-explained
PyTutorial | Python Array vs List: Key Differences Explained
March 25, 2026 - You must specify a type code when creating one. # Importing and creating a Python array from array import array # 'i' is the type code for signed integers my_array = array('i', [1, 2, 3, 4, 5]) print(my_array)
🌐
FavTutor
favtutor.com › blogs › python-array-vs-list
Array vs List in Python | 6 Main Differences
January 2, 2024 - Finally, when it comes to some tasks like sorting and searching, arrays can be more effective. This is due to the fact that contiguous blocks like memory may conduct these operations more effectively than scattered elements. The Python code for the earlier example I used to demonstrate the benefits of arrays over lists is available here:
🌐
Educative
educative.io › answers › arrays-vs-lists-in-python
Arrays vs. Lists in Python
Yes, arrays in Python are mutable, meaning you can change their contents after creation. This applies to both lists and NumPy arrays. For example, you can modify individual elements of a NumPy array or a Python list directly.
🌐
W3Schools
w3schools.com › python › python_dsa_lists.asp
Python Lists and Arrays
Sometimes we want to perform actions that are not built into Python. Then we can create our own algorithms. For example, an algorithm can be used to find the lowest value in a list, like in the example below: Create an algorithm to find the lowest value in a list: my_array = [7, 12, 9, 4, 11, 8] minVal = my_array[0] for i in my_array: if i < minVal: minVal = i print('Lowest value:', minVal) Try it Yourself »
🌐
Krayonnz
krayonnz.com › user › doubts › detail › 619ba0f3c12ba500474bab3c › what-is-the-difference-between-python-arrays-and-lists
What is the difference between python arrays and lists?
List are a part of python's syntax so they do not need to declared first. Lists can be resized quickly. Arrays are just a thin wrapper on C arrays.
🌐
Scientech Easy
scientecheasy.com › home › blog › python array vs. list | what’s difference?
Python Array vs. List | What's Difference? - Scientech Easy
January 26, 2026 - Elements of a list are enclosed in a square bracket and separated by each element by a comma. [blocksy-content-block id=”12121″] Here is an example of it. ... # Creating a list containing three elements having different data types. mixed_list = [10, "Python", ['a','b', 'c']] # Accessing elements of array.
🌐
Cisco
ipcisco.com › home › python array vs list
Python Array vs List ⋆ | Similarities & Differences | Python Coding
March 5, 2026 - List are good for shorter sequence of data. But arrays are better for longer sequence of data. Here, we have talked about the similarities and the differences of python arrays and python lists we have compared Python array vs List.