In Python, creating a new object e.g. with a list comprehension is often better than modifying an existing one:

item_list = ['item', 5, 'foo', 3.14, True]
item_list = [e for e in item_list if e not in ('item', 5)]

... which is equivalent to:

item_list = ['item', 5, 'foo', 3.14, True]
new_list = []
for e in item_list:
    if e not in ('item', 5):
        new_list.append(e)
item_list = new_list

In case of a big list of filtered out values (here, ('item', 5) is a small set of elements), using a set is faster as the in operation is O(1) time complexity on average. It's also a good idea to build the iterable you're removing first, so that you're not creating it on every iteration of the list comprehension:

unwanted = {'item', 5}
item_list = [e for e in item_list if e not in unwanted]

A bloom filter is also a good solution if memory is not cheap.

Answer from aluriak on Stack Overflow
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ remove-multiple-elements-from-a-list-in-python
Remove Multiple Elements from List in Python - GeeksforGeeks
Removing multiple elements means eliminating all occurrences of these elements and returning a new list with the remaining numbers.
Published ย  October 28, 2025
๐ŸŒ
TutorialsPoint
tutorialspoint.com โ€บ how-do-you-remove-multiple-items-from-a-list-in-python
How do you remove multiple items from a list in Python?
The items getting removed are divisible by 5 ? # Creating a List mylist = [2, 7, 10, 14, 20, 25, 33, 38, 43] # Displaying the List print("List = ",mylist) # Delete multiple items (divisible by 5) for i in list(mylist): if i % 5 == 0: mylist.remove(i) # Display the updated list print("Updated List = ",mylist)
๐ŸŒ
Spark By {Examples}
sparkbyexamples.com โ€บ home โ€บ python โ€บ remove multiple items from list python
Remove Multiple Items from List Python - Spark By {Examples}
May 31, 2024 - The expression mylist[2:6] returns a new list containing the elements at indices 2 to 5, and you can use the del statement to remove these elements from mylist. # Initialize list mylist = [10, 5, 8, 9, 12, 7, 4, 15] print("Original list: ", ...
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ how-to-remove-specific-elements-from-a-numpy-array
How to remove specific elements from a NumPy array ? - GeeksforGeeks
July 23, 2025 - import numpy as np arr = np.array([[1 ,2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]]) print(np.delete(arr, 1, axis=0)) ... Removing multiple elements from a 2D array.
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ python-remove-array-item
Python Remove Array Item - GeeksforGeeks
July 23, 2025 - import array # Create an array of integers arr = array.array('i', [1, 2, 3, 4, 5]) # Remove the element at index 2 (third element) arr = arr[:2] + arr[3:] print(arr)
๐ŸŒ
Kitchin Research Group
kitchingroup.cheme.cmu.edu โ€บ blog โ€บ 2014 โ€บ 03 โ€บ 25 โ€บ Deleting-multiple-elements-of-a-list
Deleting multiple elements of a list
An alternative approach is to make a new list that only has the elements you want using list comprehension. For example: a = [1, 2, 5, 6, 7] ind2remove = [1, 3] a = [x for i,x in enumerate(a) if i not in ind2remove] print a ... import numpy as np a = np.array([1, 2, 5, 6, 7]) ind2remove = [1, 3] print np.delete(a, ind2remove) print a
Find elsewhere
๐ŸŒ
Stack Abuse
stackabuse.com โ€บ remove-element-from-an-array-in-python
How to Remove Elements from an Array/List in Python
September 15, 2023 - In this tutorial, we'll showcase examples of how to remove an element from an array in Python using remove(), pop(), the del keyword, and Numpy.
๐ŸŒ
IncludeHelp
includehelp.com โ€บ python โ€บ program-to-remove-multiple-elements-from-a-list-using-list-comprehension.aspx
Remove multiple elements from a list in Python
To remove multiple elements from a Python list based on given multiple values i.e., the given elements, create a list of elements to be removed and then remove the elements using the list.remove() method by iterating over the list.
๐ŸŒ
Flexiple
flexiple.com โ€บ python โ€บ remove-multiple-items-list
How to Remove Multiple Items from a Python List - Flexiple
toys = ['car', 'doll', 'train', 'teddy', 'ball'] to_remove = ['doll', 'teddy'] for item in to_remove: while item in toys: toys.remove(item) # Or, a more efficient way using list comprehension toys = [toy for toy in toys if toy not in to_remove] Python 3.10 introduced a new method, removeAll(), to help us clear out specific items from a list.
๐ŸŒ
Vultr Docs
docs.vultr.com โ€บ python โ€บ third-party โ€บ numpy โ€บ delete
Python Numpy delete() - Remove Elements | Vultr Docs
November 6, 2024 - Acquaint yourself with practical examples to maximize the efficiency and applicability of this function in your data manipulation tasks. Select the array and index of the element you wish to remove.
๐ŸŒ
W3Schools
w3schools.com โ€บ python โ€บ gloss_python_array_remove.asp
Python Remove Array Item
You can also use the remove() method to remove an element from the array. ... Note: The list's remove() method only removes the first occurrence of the specified value. Python Array Tutorial Array What is an Array Access Arrays Array Length ...
๐ŸŒ
Medium
medium.com โ€บ @heyamit10 โ€บ different-ways-to-remove-elements-from-a-numpy-array-59a8a7f8fe33
Different Ways to Remove Elements from a NumPy Array | by Hey Amit | Medium
April 18, 2025 - When working with NumPy arrays, you might often need to remove unwanted elements. While Python lists give you the remove() or pop() methods, NumPy offers more efficient and tailored solutions.
๐ŸŒ
Educative
educative.io โ€บ answers โ€บ what-is-the-array-remove-function-in-python
What is the array remove() function in Python?
An array in Python is used to store multiple values of the same type in a single variable. The remove() function is used to remove the first occurrence of a value in a given array.
๐ŸŒ
Stack Overflow
stackoverflow.com โ€บ questions โ€บ 497426 โ€บ deleting-multiple-elements-from-a-list
python - Deleting multiple elements from a list - Stack Overflow
I suppose I could always delete the higher numbered elements first but I'm hoping there is a better way. ... Use multiple slices if you care about efficiency. ... Use numpy.delete which is definitely faster (376 times, as shown later) than python lists. ... import numpy as np arr = np.array([0,3,5,7]) # [0,3,5,7] indexes = [0,3] np.delete(arr, indexes) # [3,5]
๐ŸŒ
Quora
quora.com โ€บ How-do-I-remove-more-than-one-element-from-a-list-in-Python
How to remove more than one element from a list in Python - Quora
Answer (1 of 2): It really does depend on what you are trying to achieve; and to try to give you an insight I want to explore a very simple piece of code : [code]list1 = ['a','b','c','d'] list2 = list1 # Remove item 'b' & 'c' from list1 [/code]where line 3 is what we are trying to find. The ques...
๐ŸŒ
Note.nkmk.me
note.nkmk.me โ€บ home โ€บ python
Remove an Item from a List in Python: remove, pop, clear, del | note.nkmk.me
April 17, 2025 - The first index is 0, and the last ... 50] del l[-1] print(l) # [10, 20, 30] del l[-2] print(l) # [10, 30] ... Use slice notation to delete multiple items....
๐ŸŒ
Studytonight
studytonight.com โ€บ python-programs โ€บ remove-multiple-elements-from-a-list-in-python
Remove multiple elements from a list in Python - Studytonight
In this approach, we will iterate over the list and remove them one by one if it is divisible by 5. We will use the remove() function to remove the particular number. Follow the algorithm to understand the approach better.