Removing from Lists Exercise
Question 1 of 4
What happens when you use remove() on a list with duplicate values?
numbers = [1, 2, 3, 2, 4, 2, 5]
numbers.remove(2)
print(numbers)1, 3, 4, 5
An error occurs
1, 2, 3, 4, 2, 5
1, 3, 2, 4, 2, 5
What happens when you use remove() on a list with duplicate values?
numbers = [1, 2, 3, 2, 4, 2, 5]
numbers.remove(2)
print(numbers)1, 3, 4, 5
An error occurs
1, 2, 3, 4, 2, 5
1, 3, 2, 4, 2, 5