Does python allocate memory in a continuous fashion in memory while implementing list or use a dynamic allocation?
If continuous, how does it append new elements? It should cause problems in implementing a large list.
How does this actually work?
Does python allocate memory in a continuous fashion in memory while implementing list or use a dynamic allocation?
If continuous, how does it append new elements? It should cause problems in implementing a large list.
How does this actually work?
I don't know how it is implemented behind the hood, but as it is accessible by index it doesn't look like a linked list. To me, it looks like a vector of pointers/references, but I could be totally wrong.