List objects are implemented as arrays. They are optimized for fast fixed-length operations and incur O(n) memory movement costs for pop(0) and insert(0, v) operations which change both the size and position of the underlying data representation.

See also: http://docs.python.org/library/collections.html#collections.deque

Btw, I find it interesting that the Python tutorial on data structures recommends using pop(0) to simulate a queue but does not mention O(n) or the deque option.

http://docs.python.org/tutorial/datastructures.html#using-lists-as-queues

Answer from e1i45 on Stack Overflow
🌐
Python documentation
docs.python.org › 3 › tutorial › datastructures.html
5. Data Structures — Python 3.14.3 documentation
We saw that lists and strings have many common properties, such as indexing and slicing operations. They are two examples of sequence data types (see Sequence Types — list, tuple, range). Since Python is an evolving language, other sequence data types may be added.
🌐
Dataquest
dataquest.io › blog › data-structures-in-python
Python Data Structures: Lists, Dictionaries, Sets, Tuples – Dataquest
May 12, 2025 - Lists in Python are implemented as dynamic mutable arrays which hold an ordered collection of items. First, in many programming languages, arrays are data structures that contain a collection of elements of the same data types (for instance, ...
Discussions

What is the underlying data structure for Python lists? - Stack Overflow
What is the typical underlying data structure used to implement Python's built-in list data type? More on stackoverflow.com
🌐 stackoverflow.com
What’s the best way to learn data structures using Python
Data Structures and Algos (DSA) is usually an early course (or set of courses) for an undergrad degree in CS. There aren't typically many prerequisites except: coding basics – e.g., you know about variables, functions, flow controls, etc. OOP basics – e.g., you know about classes, instances, inheritance, etc. Not knowing you, my suggestion would be: brush up on coding basics – Can you write a function from scratch? How about a small imperative program? if the DSA course uses OOP, brush up on OOP – Can you write a class from scratch? How about small OOP program? keep engaging with your course, or another DSAcourse, until you get over the hump Good luck! More on reddit.com
🌐 r/learnprogramming
31
111
May 15, 2023
Course recommendation: Data Structures and Algorithms with PYTHON
Check out this free interactive course "Problem Solving with Algorithms and Data Structures using Python": https://runestone.academy/ns/books/published/pythonds3/index.html See also https://github.com/tayllan/awesome-algorithms — curated list of resources to learn and/or practice algorithms More on reddit.com
🌐 r/learnprogramming
68
372
May 10, 2023
Learning DSA in python
Data Structures and Algorithms in Python - Full Course for Beginners Algorithms in Python – Full Course for Beginners More on reddit.com
🌐 r/learnpython
105
220
January 1, 2023
🌐
W3Schools
w3schools.com › python › python_lists.asp
Python Lists
Getting Started Mean Median Mode Standard Deviation Percentile Data Distribution Normal Data Distribution Scatter Plot Linear Regression Polynomial Regression Multiple Regression Scale Train/Test Decision Tree Confusion Matrix Hierarchical Clustering Logistic Regression Grid Search Categorical Data K-means Bootstrap Aggregation Cross Validation AUC - ROC Curve K-nearest neighbors · Python DSA Lists and Arrays Stacks Queues Linked Lists Hash Tables Trees Binary Trees Binary Search Trees AVL Trees Graphs Linear Search Binary Search Bubble Sort Selection Sort Insertion Sort Quick Sort Counting Sort Radix Sort Merge Sort
🌐
GeeksforGeeks
geeksforgeeks.org › python › python-data-structures
Python Data Structures - GeeksforGeeks
as well as some advanced data structures like trees, graphs, etc. Python Lists are just like the arrays, declared in other languages which is an ordered collection of data.
Published   July 23, 2025
🌐
Codecademy
codecademy.com › learn › python-3-data-structures-and-loops › modules › learn-python3-lists › cheatsheet
Python Data Structures and Loops: Lists Cheatsheet | Codecademy
Level up in financial analytics by learning Python to process, analyze, and visualize financial data. ... In Python, lists are ordered collections of items that allow for easy use of a set of data.
🌐
Real Python
realpython.com › python-data-structures
Common Python Data Structures (Guide) – Real Python
October 21, 2023 - Python lists can hold arbitrary elements—everything is an object in Python, including functions. Therefore, you can mix and match different kinds of data types and store them all in a single list. This can be a powerful feature, but the downside is that supporting multiple data types at the same time means that data is generally less tightly packed. As a result, the whole structure takes up more space:
Find elsewhere
🌐
Topcoder
topcoder.com › thrive › articles › python-data-structures-list-and-tuples
Python Data Structures - List and Tuples
The most flexible data structure in Python is a list. They are used to store a variety of data items, ranging from integers to strings and even another list!
🌐
Edureka
edureka.co › blog › data-structures-in-python
Data Structures in Python | List, Tuple, Dict, Sets, Stack, Queue
November 27, 2024 - As the name suggests, these Data ... faster. Let’s discuss each of them in detail. Lists are used to store data of different data types in a sequential manner....
🌐
Vagrant
ashki23.github.io › python-str.html
Python data structures
str(5) + ' five' ## 5 five int('5') + 5 ## 10 float('5') + 5 ## 10.0 list((2,4,6)) ## [2, 4, 6] list({'a':1,'b':2}) ## ['a', 'b'] list({'a':1,'b':2}.values()) ## [1, 2] tuple([1,3,5]) ## (1,3,5) set([1,3,5,1,3,5]) ## {1, 3, 5} dict([('a',1),('b',2),('c',3)]) ## {'a': 1, 'b': 2, 'c': 3} ... One of the way that data can be stored in Python is strings and as we discussed they are immutable and subscriptable objects that can be concatenated together.
🌐
Swaroopch
python.swaroopch.com › data_structures.html
Data Structures - A Byte of Python - SwaroopCH.com
A list is a data structure that holds an ordered collection of items i.e. you can store a sequence of items in a list. This is easy to imagine if you can think of a shopping list where you have a list of items to buy, except that you probably have each item on a separate line in your shopping ...
🌐
Utexas
johnfoster.pge.utexas.edu › numerical-methods-book › PythonIntro_ListsTuplesDictionaries.html
Common Data Structures: Lists, Tuples, and Dictionaries
September 8, 2020 - Notice Python lists use square brackets [] and separate the entries with commas. ... Lists support indexing to extract the data stored in them.
🌐
Educative
educative.io › blog › 8-common-data-structures-in-python-every-programmer-must-know
8 common data structures in Python every programmer must know
2 weeks ago - Most data structures in Python are modified forms of these or use the built-in structures as their backbone. List: Array-like structures that let you save a set of mutable objects of the same type to a variable.
🌐
Built In
builtin.com › data-science › python-data-structures
What Are Python Data Structures? (Definition, Examples) | Built In
Summary: Python includes four main built-in data structures — lists, tuples, sets and dictionaries — each offering different ways to organize, store and process data. Users can also implement custom structures like stacks, queues and trees ...
🌐
Codecademy
codecademy.com › article › python-data-structures
A Guide to Python Data Structures | Codecademy
Heterogeneous: Lists can contain a mix of data types (e.g., integers, strings, other lists). Indexable and iterable: We can access elements using indices and loop through them using loops like for or while. Supports nesting: Lists can contain other lists or even more complex structures like dictionaries. Here is an example that demonstrates the usage of lists in Python:
🌐
Corporate Finance Institute
corporatefinanceinstitute.com › home › resources › python data structures
Python Data Structures - Overview, Types, Examples
November 23, 2023 - The basic Python data structures in Python include list, set, tuples, and dictionary. Each of the data structures is unique in its own way.
🌐
Du
cs.du.edu › ~intropython › byte-of-python › data_structures.html
Lists, Tuples, Dictionaries, and Sets · HonKit
A list is a data structure that holds an ordered collection of items i.e. you can store a sequence of items in a list. This is easy to imagine if you can think of a shopping list where you have a list of items to buy, except that you probably have each item on a separate line in your shopping ...
🌐
GeeksforGeeks
geeksforgeeks.org › python › python-lists
Python Lists - GeeksforGeeks
In Python, a list is a built-in data structure that can hold an ordered collection of items.
Published   January 10, 2026
🌐
Medium
medium.com › @techwithpraisejames › a-beginners-guide-to-mastering-python-data-structures-with-practical-examples-95befa4fb367
A Beginner’s Guide to Mastering Python Data Structures | by Praise James | Medium
April 11, 2025 - However, for this article, we are focused squarely on the four built-in data structures. A list is an ordered collection of elements. These elements can be strings, numbers, Boolean values, or any other valid Python object.
🌐
Mimo
mimo.org › glossary › python › data-structures
Python Data Structures: Syntax, Usage, and Examples
Developers often leverage them in Python programming for projects spanning data analysis, machine learning, and general dsa (data structures and algorithms) tasks. A Python list is an ordered collection defined with square brackets and commas that allows adding, removing, and modifying elements.