You can find a short collection of useful list functions here.

list.pop(index)

>>> l = ['a', 'b', 'c', 'd']
>>> l.pop(0)
'a'
>>> l
['b', 'c', 'd']
>>> 

del list[index]

>>> l = ['a', 'b', 'c', 'd']
>>> del l[0]
>>> l
['b', 'c', 'd']
>>> 

These both modify your original list.

Others have suggested using slicing:

  • Copies the list
  • Can return a subset

Also, if you are performing many pop(0), you should look at collections.deque

from collections import deque
>>> l = deque(['a', 'b', 'c', 'd'])
>>> l.popleft()
'a'
>>> l
deque(['b', 'c', 'd'])
  • Provides higher performance popping from left end of the list
Answer from kevpie on Stack Overflow
๐ŸŒ
W3Schools
w3schools.com โ€บ python โ€บ ref_list_pop.asp
Python List pop() Method
Remove List Duplicates Reverse ... Plan Python Interview Q&A Python Bootcamp Python Training ... The pop() method removes the element at the specified position....
Discussions

I was surprised at how slow list.pop() is! And list.remove() is even many times slower
This is simply how lists work, nothing surprising here. Removing the first element requires moving all the elements after it one step to the left to fill that gap, which makes this operation run in linear time. It means that clearing the list this way is O(n2), so it unsurprisingly takes a long time, as bubble sorting the (shuffled) list could even be faster. This is why we think of alternatives when solving problems, such as using collections.deque, reversing the list (O(n) instead of O(n2)) or just using pop() from the end if it works. More on reddit.com
๐ŸŒ r/learnpython
38
57
August 22, 2021
I don't think I understand what the .pop() method does on a list....
You shouldn't modify the list while iterating over it. It leads to weirdness like this. More on reddit.com
๐ŸŒ r/learnpython
9
3
March 2, 2021
Why pop method removes two list at once?
Pop modifies the list. Here you remove an item from the list, and throw it away: guest.pop() Then you remove another item, and print it: print(f"{guest.pop()}") In your second example, you only call pop once, hence why only one item is removed. More on reddit.com
๐ŸŒ r/learnpython
27
16
December 17, 2023
What is Python's list.append() method WORST Time Complexity? It can't be O(1), right?
I've read on Stackoverflow that in Python Array doubles in size when run of space It's actually not double, but it does increase proportional to the list size (IIRC it's about 12%, though there's some variance at smaller sizes). This does result in the same asymptotics though, so I'll assume doubling in the following description for simplicity. So basically it has to copy all addresses log(n) times. Not quite. Suppose we're appending n items to an empty vector. We will indeed do log(n) resizes, so you might think "Well, resizes are O(n), so log(n) resizes is n log(n) operations, which if we amortize over the n appends we did means n log(n)/n, or log(n) per append". However, there's a flaw in this analysis: we do not copy "all addresses" each of those times. Ie. the copies are not O(n). Sure, the last copy we do will involve copying n items, but the one before it only copied n/2, and so on. So we actually do 1 + 2 + 4 + ... + n copies, which sums to 2n-1. Divide that by n and you get ~2 operations per append - a constant. I assume since it copies addresses, not information We are indeed only copying the pointer, but this doesn't really matter for the complexity analysis. Even if it was copying a large structure, that'd only increase the time by a constant factor. Does that mean that O(1) is the average time complexity? It's the amortized worst case complexity (ie. what happens over a large number of operations). While any one operation can indeed end up doing O(n) operations, there's an important distinction that over a large number of operations, you are guaranteed to only be O(1), which is a distinction just talking about average case wouldn't capture. More on reddit.com
๐ŸŒ r/learnpython
11
3
October 26, 2022
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ python-removing-first-element-of-list
Remove first element from list in Python - GeeksforGeeks
Explanation: a.pop(0) removes and returns the first element of the list, shifting the remaining elements left.
Published ย  July 11, 2025
๐ŸŒ
Finxter
blog.finxter.com โ€บ home โ€บ learn python blog โ€บ python list pop()
Python List pop() โ€“ Be on the Right Side of Change
June 19, 2021 - This tutorial shows you everything ... in the Python programming language. ... The list.pop() method removes and returns the last element from an existing list....
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ python-list-pop-method
Python List pop() Method - GeeksforGeeks
4 days ago - Explanation: a.pop() removes and returns the last element of the list and removed value is stored in val.
๐ŸŒ
Programiz
programiz.com โ€บ python-programming โ€บ methods โ€บ list โ€บ pop
Python List pop()
If you need to pop the 4th element, you need to pass 3 to the pop() method. # programming languages list languages = ['Python', 'Java', 'C++', 'Ruby', 'C'] # remove and return the last item print('When index is not passed:')
๐ŸŒ
LabEx
labex.io โ€บ tutorials โ€บ python-how-to-efficiently-remove-elements-from-the-left-side-of-a-python-list-397985
How to efficiently remove elements from the left side of a Python list | LabEx
Removing elements from the left ... The most straightforward way to remove elements from the left side of a list is to use the pop() method....
Find elsewhere
๐ŸŒ
Mimo
mimo.org โ€บ glossary โ€บ python โ€บ pop()
Python Pop Method: Essential Data Manipulation techniques
Without an argument, the default index is -1, pointing to the last element in the list. ## **When to Use pop() in Python Lists** ### Stack Data Structure A stack is a classic use case for `pop()` because it removes the last added element first (last in, first out).
๐ŸŒ
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.
๐ŸŒ
Reddit
reddit.com โ€บ r/learnpython โ€บ i was surprised at how slow list.pop() is! and list.remove() is even many times slower
r/learnpython on Reddit: I was surprised at how slow list.pop() is! And list.remove() is even many times slower
August 22, 2021 -

I know there is a list.clear(), I'm just sharing that I didn't expect that using list.pop() and list.remove() specifically could slow down the program that much.

li = list(range(500000))

Creating a list is quick.

So we are going to test out pop/remove specific values. For the purpose of this "benchmark", we are going to remove all elements from the list:

while (li):
    li.pop(0)

It took 74.735 seconds to pop all the elements! It's ridiculously long.
I KNOW it would have been much faster if I even had used li.pop() without the index or maybe used filter function, list comprehension with conditional or whatever
But that's what I'm trying to show, how slow it is to remove certain list items specifically using pop and remove methods.

And li.remove(), which always requires a specified value to remove, is even worse than pop!

 for num in li:
    li.remove(num)

This one took me 303.268 seconds to complete. How crazy it is.

I've been having fun with abstract data structures. Implemented linked lists and a queues running on linked lists.

And for the sake of interest, I decided to compare the performance of the queue based on the linked list and the usual python list. And I was surprised. When my linked list Queue dequeued 500.000 elements in 0.5 seconds, while python list Queue was doing it in 75 seconds.

Top answer
1 of 5
46
This is simply how lists work, nothing surprising here. Removing the first element requires moving all the elements after it one step to the left to fill that gap, which makes this operation run in linear time. It means that clearing the list this way is O(n2), so it unsurprisingly takes a long time, as bubble sorting the (shuffled) list could even be faster. This is why we think of alternatives when solving problems, such as using collections.deque, reversing the list (O(n) instead of O(n2)) or just using pop() from the end if it works.
2 of 5
13
Just thought I'd mention that, on top of being the slowest option presented here, for num in li: li.remove(num) is also broken; it skips every other value in the list and the result is essentially only half of the original list, not an empty one. The reason for this already came up in the other answers, as the values shift in the list when you remove one, but the loop itself doesn't take this into account. You can think of the loop as if it had a hidden index variable it updates on every iteration, and when the values are shifted what was previously going to be the next value after deletion is now where the deleted one was, the loop index goes up by one, and the next index to be removed is the one next to the current one. EDIT: It's easier to understand visually, I guess. idx | 0 | 1 | 2 | 3 | 4 | val | 1 | 2 | 3 | 4 | 5 Loop index: 0 Removing item at index 0 idx | 0 | 1 | 2 | 3 | 4 | val | 2 | 3 | 4 | 5 | ... Loop index: 1 Removing item at index 1 idx | 0 | 1 | 2 | 3 | 4 | val | 2 | 4 | 5 | ... | ... Loop index: 2 Removing item at index 2 Idx | 0 | 1 | 2 | 3 | 4 | val | 2 | 4 | ... | ... | ... EDIT #2: If you needed to empty a list in a real project, the best options would be to either reassign an empty list, or use list.clear which is way faster than using list.pop in a loop.
๐ŸŒ
freeCodeCamp
freecodecamp.org โ€บ news โ€บ python-pop-how-to-pop-from-a-list-or-an-array-in-python
Python .pop() โ€“ How to Pop from a List or an Array in Python
March 1, 2022 - This means that when the pop() method doesn't have any arguments, it will remove the last list item. So, the syntax for that would look something like this: ... #list of programming languages programming_languages = ["Python", "Java", "JavaScript"] ...
๐ŸŒ
Tutorialspoint
tutorialspoint.com โ€บ python โ€บ list_pop.htm
Python List pop() Method
The Python List pop() method removes and returns the last object from the list, by default. However, the method also accepts an optional index argument and the element at the index is removed from the list.
๐ŸŒ
DigitalOcean
digitalocean.com โ€บ community โ€บ tutorials โ€บ pop-python
How to Use `.pop()` in Python Lists and Dictionaries | DigitalOcean
July 24, 2025 - Use .pop() when you need to process elements from a list or dictionary and remove them as you go. This is especially useful in algorithms that consume data, such as parsing, filtering, or transforming collections, ensuring that processed items are not revisited or left behind in your data ...
๐ŸŒ
Analytics Vidhya
analyticsvidhya.com โ€บ home โ€บ understanding python pop() method
Understanding Python pop() Method
October 12, 2024 - If you use the pop() method and specify an index, this function deletes an element by this index and brings the value of the deleted element. The list can be also changed in place, that means that the original list is changing its content.
๐ŸŒ
GoLinuxCloud
golinuxcloud.com โ€บ home โ€บ programming โ€บ python โ€บ python list pop() method: remove and return items
Python List pop() Method: pop by Index, Last Item, First Item, and Errors (2026)
January 9, 2024 - It removes one element from the list at the given index, returns that element, and shortens the list in place; with no argument it pops the last item. The value that was removed; you can assign it to a variable or use it in an expression, unlike ...
๐ŸŒ
freeCodeCamp
freecodecamp.org โ€บ news โ€บ python-list-pop-how-to-pop-an-element-from-a-array
Python list.pop() โ€“ How to Pop an Element from a Array
February 9, 2023 - In this article, you'll learn how to remove elements in a Python list using: The pop() method.
๐ŸŒ
Python Examples
pythonexamples.org โ€บ python-list-pop
Python List pop ()
Python List pop() method removes the object at specified index in the list. The items in the list that are present after the specified index, if any, are shifted towards left side by one position.
๐ŸŒ
DataCamp
datacamp.com โ€บ tutorial โ€บ python-pop
How to Use the Python pop() Method | DataCamp
July 31, 2024 - This technique can be helpful in several scenarios. Imagine, for example, you have a list of tasks to handle one by one. By using pop(), you can remove each task as it's completed, keeping your list focused on what's left.
๐ŸŒ
FavTutor
favtutor.com โ€บ blogs โ€บ remove-first-element-from-list-python
Remove First Element from List in Python (with code)
August 24, 2023 - In this method, we convert the list into the deque and then use the popleft() method which helps to return the first element from the front of the list. Remember that to implement this method, you have to import the Python deque at the beginning ...