Write a program to input a list and an element, and remove all occurrences of the given
element from the list.
Answers
Answered by
5
Answer:
list. remove() list. List comprehension. The recommended solution is to use list comprehension. filter(function, iterable) We can also use built-in function filter() which can construct an iterator from elements of the list (an iterable) for which function returns true.
Similar questions