You can use pop to remove an item from any position in a list by including the index of the item you
want to remove in parentheses.
So now we will add, for example, zero, right?
Let's delete the BMW here and now.
The last car model I owned was a BMW.
We start popping the first car model in the list and then we print a message about that car model.
The output is a simple sentence describing the first car model I have ever owned.
Remember that each time you use the pop, the item you work with is no longer stored in the list.
So actually, let's try it with our first created code, which you can download from attachments.
Now let's let's see what will happen if we try that same example list.
And as you can see here, we no longer have BMW here and instead we have popped the BMW variable and
pop car model.
So the pop car models as I said earlier, this is not a list.
This is just a variable that holds the pop car pop value here.
So if you are unsure whether to use the Dell statement or the pop method, here's a simple way to decide.
So when you want to delete an item from a list and not use that item in any way, you can use the Dell.
You can use the Dell statement.
If you want to use an item as you remove it, you use the pop.