1
00:00:00,490 --> 00:00:05,230
Sometimes you want to know the position of the value you want to remove from a list.

2
00:00:05,260 --> 00:00:13,330
If you only know the value of the item you want to remove, you can use the remove method.

3
00:00:13,510 --> 00:00:23,230
So for example, say we want to remove the value car Toyota from the list of car models in this case.

4
00:00:23,440 --> 00:00:29,860
In order in order to do that, we will enter the first car models dot remove here and we will enter,

5
00:00:29,860 --> 00:00:31,620
for example, Toyota.

6
00:00:31,630 --> 00:00:32,170
Right.

7
00:00:32,350 --> 00:00:34,620
So here we will.

8
00:00:34,630 --> 00:00:38,640
And after removing it, we will print the car models.

9
00:00:38,650 --> 00:00:39,640
That's it.

10
00:00:39,640 --> 00:00:42,550
As you can see here, we don't have the Toyota anymore.

11
00:00:42,580 --> 00:00:49,150
Before before the removal here, we had the this right.

12
00:00:49,360 --> 00:00:55,210
BMW was first, first Mercedes was second, second.

13
00:00:55,300 --> 00:00:58,300
And Toyota here is removed.

14
00:00:58,780 --> 00:01:01,760
So Toyota was third and Suzuki was fourth.

15
00:01:01,970 --> 00:01:08,890
So since the Toyota is removed here, the Suzuki changed this place to third.

16
00:01:08,930 --> 00:01:09,500
Right.

17
00:01:09,860 --> 00:01:10,610
Third.

18
00:01:10,870 --> 00:01:12,950
So we can change this place.

19
00:01:12,950 --> 00:01:15,650
Fourth to third.

20
00:01:17,870 --> 00:01:18,440
That's it.

21
00:01:18,830 --> 00:01:19,790
So.

22
00:01:21,360 --> 00:01:22,200
Uh, now.

23
00:01:23,720 --> 00:01:24,200
We can.

24
00:01:24,470 --> 00:01:29,090
As you can see here, we remove the item with just only name.

25
00:01:29,840 --> 00:01:34,670
So you can also use the remove method to work with the value that's being removed from a list.

26
00:01:34,670 --> 00:01:41,060
So let's remove the value Toyota and print a reason for removing it from the list.

27
00:01:41,180 --> 00:01:46,670
So in order to do that, we will use, for example, yes, print.

28
00:01:46,670 --> 00:01:47,600
And here.

29
00:01:47,960 --> 00:01:54,650
What's the reason for removing a Toyota from car models you casual, right?

30
00:01:54,680 --> 00:02:01,610
It has nothing almost in some Toyota models almost has nothing special compared to Mercedes, BMW and

31
00:02:01,610 --> 00:02:02,030
Suzuki.

32
00:02:02,030 --> 00:02:02,510
Right.

33
00:02:02,660 --> 00:02:04,850
Suzuki is not that special.

34
00:02:04,850 --> 00:02:07,820
But yeah, it's just an example here.

35
00:02:08,210 --> 00:02:10,790
So to casual.

36
00:02:12,500 --> 00:02:12,920
Or two.

37
00:02:12,950 --> 00:02:13,520
Standard.

38
00:02:13,670 --> 00:02:15,800
Two standard.

39
00:02:16,100 --> 00:02:19,400
And here we will enter the Toyota.

40
00:02:19,550 --> 00:02:21,530
Now, after that, we will.

41
00:02:24,400 --> 00:02:25,690
My car models.

42
00:02:26,480 --> 00:02:30,200
That remove the two standard, Right?

43
00:02:30,850 --> 00:02:37,600
So after that we will printing the car models and just write the reason for removal.

44
00:02:37,720 --> 00:02:41,080
So print F here.

45
00:02:44,080 --> 00:02:53,800
A and here to standard that title and after that is two standard.

46
00:02:54,980 --> 00:02:57,020
Start to drive.

47
00:02:58,920 --> 00:03:01,650
I want something special.

48
00:03:01,680 --> 00:03:02,340
Right.

49
00:03:02,370 --> 00:03:03,390
And here.

50
00:03:03,390 --> 00:03:04,080
That's it.

51
00:03:04,110 --> 00:03:07,020
At Toyota Center today, I want something special.

52
00:03:07,910 --> 00:03:14,330
And after defining the list, we assign the value Toyota to a variable called to standard.

53
00:03:14,360 --> 00:03:23,840
So when the we then use this variable to tell the python which value to remove the from the list, in

54
00:03:23,840 --> 00:03:28,070
this case, here in the ninth line we tell the python which.

55
00:03:29,760 --> 00:03:33,750
Number or which model to remove first.

56
00:03:34,200 --> 00:03:40,650
And here the Toyota has been removed from the list, but it's still accessible through the variable,

57
00:03:41,160 --> 00:03:42,420
uh, to standard.

58
00:03:42,420 --> 00:03:42,900
Right.

59
00:03:42,900 --> 00:03:49,980
And allowing us to print a statement about why we removed the Toyota from the list of motorcycles.
