Sometimes you want to know the position of the value you want to remove from a list.
If you only know the value of the item you want to remove, you can use the remove method.
So for example, say we want to remove the value car Toyota from the list of car models in this case.
In order in order to do that, we will enter the first car models dot remove here and we will enter,
for example, Toyota.
Right.
So here we will.
And after removing it, we will print the car models.
That's it.
As you can see here, we don't have the Toyota anymore.
Before before the removal here, we had the this right.
BMW was first, first Mercedes was second, second.
And Toyota here is removed.
So Toyota was third and Suzuki was fourth.
So since the Toyota is removed here, the Suzuki changed this place to third.
Right.
Third.
So we can change this place.
Fourth to third.
That's it.
So.
Uh, now.
We can.
As you can see here, we remove the item with just only name.
So you can also use the remove method to work with the value that's being removed from a list.
So let's remove the value Toyota and print a reason for removing it from the list.
So in order to do that, we will use, for example, yes, print.
And here.
What's the reason for removing a Toyota from car models you casual, right?
It has nothing almost in some Toyota models almost has nothing special compared to Mercedes, BMW and
Suzuki.
Right.
Suzuki is not that special.
But yeah, it's just an example here.
So to casual.
Or two.
Standard.
Two standard.
And here we will enter the Toyota.
Now, after that, we will.
My car models.
That remove the two standard, Right?
So after that we will printing the car models and just write the reason for removal.
So print F here.
A and here to standard that title and after that is two standard.
Start to drive.
I want something special.
Right.
And here.
That's it.
At Toyota Center today, I want something special.
And after defining the list, we assign the value Toyota to a variable called to standard.
So when the we then use this variable to tell the python which value to remove the from the list, in
this case, here in the ninth line we tell the python which.
Number or which model to remove first.
And here the Toyota has been removed from the list, but it's still accessible through the variable,
uh, to standard.
Right.
And allowing us to print a statement about why we removed the Toyota from the list of motorcycles.