Naked Python list

Naked Python list

5 years ago
Anonymous $L9wC17otzH

https://medium.com/@yasufumy/data-structure-dynamic-array-3370cd7088ec

I often use Python, but I really don’t care about the way how Python works internally. So today I focus on Python list and explain inside implementation of it. Python’s list.append and list.pop change the list size dynamically, which make them run fast in O(1) time. Please note that list.pop for the last item only takes constant time. In this post, I’ll show the reason why it has become possible.

We call the data structure like Python list the dynamic array, and call normal array the static array. This post is structured as follows.