Python list

Python's built-in ordered, growable sequence, implemented as a dynamic array of pointers to objects.

In more detail

Index access and append at the end are fast: O(1) and O(1) amortised. Inserting or removing at the front, including list.pop(0), shifts every other element and costs O(n). That makes a list an excellent stack and a poor queue.

Related terms

Taught in

References