In this tutorial, we will learn about the internal working of the list in Python 3.x. Or earlier. We will also look at the object and frame formation when we write a python statement at each step.
Initializing the list: This means that we are creating a list with some elements.
Here list variable is declared in the global frame which is referring to a list object as shown above
Now let’s see what happened when we append the element in the list.
Here the element is added at the end and the size of the list is increased by 1.
Now let’s observe how we can delete a specific element from the list.
When an element is deleted from the list all the characters are shifted to the consecutive left position.
Now we declare a new variable and reference it to sliced part of the list.
Lastly, we consider deleting the element at a specific index
>>> del p
In this article, we learned about the Internal working of the list in Python 3.x. Or earlier