162k views
2 votes
What does the list "car_makes" contain after these commands are executed?

car_makes = ["Ford", "Volkswagen", "Toyota"]
car_makes.remove("Ford")


1. ['', 'Porsche', 'Vokswagen', 'Toyota']
2. ['Volkswagen', 'Toyota']
3. ['Toyota', 'Ford']
4. [null, 'Porsche', 'Toyota']

User Soca
by
8.8k points

1 Answer

5 votes

Answer:

The correct answer is option 2: ['Volkswagen', 'Toyota']

Step-by-step explanation:

After the remove method is called on the car_makes list to remove the element "Ford", the list car_makes will contain the elements "Volkswagen" and "Toyota"

User Agilefall
by
7.8k points