The effects of the three different methods to remove an element from a list:

remove removes the first matching value, not a specific index:

>>> a = [0, 2, 3, 2]
>>> a.remove(2)
>>> a
[0, 3, 2]

del removes the item at a specific index:

>>> a = [9, 8, 7, 6]
>>> del a[1]
>>> a
[9, 7, 6]

and pop removes the item at a specific index and returns it.

>>> a = [4, 3, 5]
>>> a.pop(1)
3
>>> a
[4, 5]

Their error modes are different too:

>>> a = [4, 5, 6]
>>> a.remove(7)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: list.remove(x): x not in list
>>> del a[7]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
IndexError: list assignment index out of range
>>> a.pop(7)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
IndexError: pop index out of range
Answer from Martijn Pieters on Stack Overflow
🌐
W3Schools
w3schools.com › python › ref_list_pop.asp
Python List pop() Method
Remove List Duplicates Reverse ... Study Plan Python Interview Q&A Python Training ... The pop() method removes the element at the specified position....
🌐
Python documentation
docs.python.org › 3 › tutorial › datastructures.html
5. Data Structures — Python 3.14.7 documentation
Remove the item at the given position in the list, and return it. If no index is specified, a.pop() removes and returns the last item in the list.
🌐
Mimo
mimo.org › glossary › python › pop()
Python Pop Method: Essential Data Manipulation techniques
In Python, pop() is a list method that removes and returns an element of a list. With an argument, pop() removes and returns the item at the specified index (starting from 0).
🌐
GeeksforGeeks
geeksforgeeks.org › python › python-list-pop-method
Python List pop() Method - GeeksforGeeks
July 17, 2026 - DSA Python · Data Science · NumPy · Pandas · Practice · Django · Flask · Last Updated : 17 Jul, 2026 · pop() method removes an element from a list and returns the removed value.
🌐
DataCamp
datacamp.com › tutorial › python-pop
How to Use the Python pop() Method | DataCamp
July 31, 2024 - Before going into more detail, ... Python's syntax and different functions. The pop() method is used in lists and dictionaries to remove specific items and return the value....
Find elsewhere
🌐
YouTube
youtube.com › watch
Python pop() List Method - TUTORIAL - YouTube
Python tutorial on the .pop() list method. Learn how to pop values from lists in Python.This video is part of the new List Methods series! Subscribe to get ...
Published: October 8, 2020
🌐
iCert Global
icertglobal.com › home › community › what is the actual difference between pop and remove methods in python list manipulation?
What is the actual difference between pop and remove methods in Python list manipulation?
November 14, 2025 - ... he core difference lies in how the element is identified. The .pop() method is index-based; it removes and returns the element at a specific position (defaulting to the last item).
Top answer
1 of 3
18

Are your lists large? If so, use ifilter from itertools to filter out elements that you don't want lazily (with no up front cost).

Lists not so large? Just use a list comprehension:

 newlist = [x for x in oldlist if x not in ['a', 'c'] ]

This will create a new copy of the list. This is not generally an issue for efficiency unless you really care about memory consumption.

As a happy medium of syntax convenience and laziness ( = efficiency for large lists), you can construct a generator rather than a list by using ( ) instead of [ ]:

interestingelts = (x for x in oldlist if x not in ['a', 'c'])

After this, you can iterate over interestingelts, but you can't index into it:

 for y in interestingelts:    # ok
    print y

 print interestingelts[0]     # not ok: generator allows sequential access only
2 of 3
15

You want a list comprehension:

L = [c for c in L if c not in ['a', 'c']]

Or, if you really don't want to create a copy, go backwards:

for i in reversed(range(len(L))):
    if L[i] in ['a', 'c']:
        L.pop(i)    # del L[i] is more efficient

Thanks to ncoghlan for reversed() & phooji for del L[i] suggestions. (I decided to leave it as L.pop(i), since that's how the question was initially formulated.)

Also, as J.S. Sebastian correctly points out, going backwards is space efficient but time inefficient; most of the time a list comprehension or generator (L = (...) instead of L = [...]) is best.

Edit:

Ok, so since people seem to want something less ridiculously slow than the reversed method above (I can't imagine why... :) here's an order-preserving, in-place filter that should differ in speed from a list comprehension only by a constant. (This is akin to what I'd do if I wanted to filter a string in c.)

write_i = 0
for read_i in range(len(L)):
    L[write_i] = L[read_i]
    if L[read_i] not in ['a', 'c']:
         write_i += 1

del L[write_i:]
print L
# output: ['b', 'd']
🌐
Programiz
programiz.com › python-programming › methods › list › pop
Python List pop() (with Code Visualization)
The list pop() method removes and returns the item at a specified index. If no index is specified, pop() removes and returns the last item. Here's a quick example:...
🌐
Simplilearn
simplilearn.com › home › resources › software development › pop in python: an introduction to pop function with examples
Pop in Python: An Introduction to Pop Function with Examples
November 13, 2025 - Pop in Python is a pre-defined, in-built function. Learn pop function's ✓ syntax ✓ parameters ✓ examples, and much more in this tutorial. Start learning now!
Address: 5851 Legacy Circle, 6th Floor, Plano, TX 75024 United States
🌐
Medium
medium.com › teqius › python-pop-remove-items-from-lists-dictionaries-sets-and-more-a3e59daeff45
Python Pop: Remove Items From Lists, Dictionaries, Sets, and More | by John Akhilomen | teqius | Medium
November 26, 2024 - You remove an item from the list and get a handy little reminder of what is left there — sort of like removing the apples from the list and then getting a new list back without the apples in it.
🌐
w3resource
w3resource.com › python › list › list_pop.php
Python List pop() Method
April 14, 2026 - Python List - pop() Method: The pop() method is used to remove the item at the given position in a list, and return it.
🌐
YouTube
youtube.com › watch
#67 Pop Method in Python – Remove List Items by Index with Ease! - YouTube
🔹 Pop Method in Python – Remove Items by Index! 🔹In this Python tutorial, we explore the pop() method and how it's used to remove elements from a list by t...
Published: April 28, 2025
🌐
YouTube
youtube.com › code master
How To Use The Pop List Method In Python 3 - YouTube
Python 3.7 Version - https://youtu.be/SUOX1-gMWPwBe sure to like, share and comment to show your support for our tutorials.==================================...
Published: November 3, 2015
Views: 8K