1
00:00:00,410 --> 00:00:07,610
You can use pop to remove an item from any position in a list by including the index of the item you

2
00:00:07,610 --> 00:00:09,290
want to remove in parentheses.

3
00:00:09,320 --> 00:00:12,500
So now we will add, for example, zero, right?

4
00:00:12,650 --> 00:00:15,020
Let's delete the BMW here and now.

5
00:00:15,380 --> 00:00:18,200
The last car model I owned was a BMW.

6
00:00:18,230 --> 00:00:24,090
We start popping the first car model in the list and then we print a message about that car model.

7
00:00:24,110 --> 00:00:29,480
The output is a simple sentence describing the first car model I have ever owned.

8
00:00:29,960 --> 00:00:37,950
Remember that each time you use the pop, the item you work with is no longer stored in the list.

9
00:00:37,970 --> 00:00:45,590
So actually, let's try it with our first created code, which you can download from attachments.

10
00:00:45,620 --> 00:00:51,020
Now let's let's see what will happen if we try that same example list.

11
00:00:51,020 --> 00:00:57,800
And as you can see here, we no longer have BMW here and instead we have popped the BMW variable and

12
00:00:57,800 --> 00:00:58,700
pop car model.

13
00:00:58,700 --> 00:01:01,590
So the pop car models as I said earlier, this is not a list.

14
00:01:01,590 --> 00:01:06,870
This is just a variable that holds the pop car pop value here.

15
00:01:07,700 --> 00:01:13,880
So if you are unsure whether to use the Dell statement or the pop method, here's a simple way to decide.

16
00:01:13,910 --> 00:01:23,340
So when you want to delete an item from a list and not use that item in any way, you can use the Dell.

17
00:01:23,390 --> 00:01:26,270
You can use the Dell statement.

18
00:01:26,630 --> 00:01:34,010
If you want to use an item as you remove it, you use the pop.
