0

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?

0

1 Answer 1

0

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.

Sign up to request clarification or add additional context in comments.

1 Comment

Hey, I found this amazing post laurentluce.com/posts/python-list-implementation and I got cleared about it. Hope it helps you too.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.