How does Python store lists internally?
data-structures, python
Solution
from Core Python Containers: Under the Hood List Implementation: Fixed-length array of pointers * When the array grows or shrinks, calls realloc() and, if necessary, copies all of the items to the new space source code: Include/listobject.h and Objects/listobject.c btw: here is the video
Problem
How are lists in python stored internally? Is it an array? A linked list? Something else? Or does the interpreter guess at the right structure for each instance based on length, etc. If the question is implementation dependent, what about the classic CPython?