remove()
function or method is used in python list to remove the first item from the list which matches the specified value.
list.remove(object)
Here,
>>> list1 = [1, 2, 3, 'cloudy']
>>> list1.remove(3)
>>> list1
[1, 2, 'cloudy']
>>> list1 = [1, 2, 3, 'cloudy']
>>> list1.remove('hello')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: list.remove(x): x not in list