Tools: Powerful Cpython Lists, Explained Like You’re The Interpreter

Tools: Powerful Cpython Lists, Explained Like You’re The Interpreter

CPython lists are actually static arrays. Understanding their contiguous memory layout explains why append() is cheap but insert() is expensive. Here is the mental model required for interviews.

Source: HackerNoon