As a developer working on a project for one of my New York clients, I recently encountered a situation where I needed to remove specific elements from a list based on their indices. In this tutorial, I will explain how to remove an element from a list by index in Python, and I will share the different methods you can use to accomplish this task effectively.
Remove an Element from a List by Index in Python
Before we get into removing elements from a list, let’s quickly review what lists and indices are in Python. A list is an ordered collection of items, and each item in the list has a corresponding index. In Python, indices start at 0 for the first element and increase by 1 for each subsequent element.
For example, let’s say we have a list of US states:
states = ["California", "New York", "Texas", "Florida", "Illinois"]In this list, “California” has an index of 0, “New York” has an index of 1, and so on.
Read How to Add an Element to the Beginning of a List in Python?
1. Use the del Keyword
One simple way to remove an element from a list by index is by using the ‘del’ keyword. Python’s ‘del’ keyword allows us to delete an element or a slice from a list based on its index.
Here’s an example:
cities = ["Los Angeles", "New York City", "Chicago", "Houston", "Phoenix"]
del cities[2]
print(cities)Output:
['Los Angeles', 'New York City', 'Houston', 'Phoenix']You can see the output in the screenshot below.

In this example, we use del cities[2] to remove the element at index 2, which is “Chicago”. After removing the element, the list is updated, and “Chicago” is no longer present.
Check out How to Find the Largest Number in a List Using Python?
2. Use the pop() Method
Another way to remove an element from a list by index is by using the pop() method in Python. The pop() method removes the element at the specified index and returns its value source.
Here’s an example:
presidents = ["George Washington", "John Adams", "Thomas Jefferson", "James Madison", "James Monroe"]
removed_president = presidents.pop(3)
print(removed_president)
print(presidents)Output:
James Madison
['George Washington', 'John Adams', 'Thomas Jefferson', 'James Monroe']You can see the output in the screenshot below.

In this example, we use presidents.pop(3) to remove the element at index 3, which is “James Madison”. The pop() method returns the removed element, so we can store it in the removed_president variable. After the removal, “James Madison” is no longer on the list.
If you don’t specify an index, the pop() method removes the last element from the list by default.
Read How to Remove None Values from a List in Python?
3. Use List Slicing
If you need to remove a range of elements from a Python list, you can use list slicing. List slicing allows you to extract a portion of a list by specifying the start and end indices.
Here’s an example:
athletes = ["Michael Phelps", "Usain Bolt", "Simone Biles", "LeBron James", "Serena Williams", "Tom Brady"]
athletes = athletes[:2] + athletes[4:]
print(athletes)Output:
['Michael Phelps', 'Usain Bolt', 'Serena Williams', 'Tom Brady']You can see the output in the screenshot below.

In this example, we use list slicing to remove the elements at indices 2 and 3 (“Simone Biles” and “LeBron James”). We create a new list by concatenating the slices athletes[:2] (elements from index 0 to 1) and athletes[4:] (elements from index 4 to the end).
Check out How to Add Elements to an Empty List in Python?
Remove Elements at Multiple Indices
Sometimes, you may need to remove elements at multiple indices from a list. One approach is to use a list comprehension along with the enumerate() function.
Here’s an example:
tech_companies = ["Apple", "Google", "Microsoft", "Amazon", "Facebook", "Netflix"]
indices_to_remove = [1, 3, 4]
updated_companies = [company for index, company in enumerate(tech_companies) if index not in indices_to_remove]
print(updated_companies)Output:
['Apple', 'Microsoft', 'Netflix']In this example, we have a list of tech companies and a list of indices we want to remove (indices_to_remove). We use a list comprehension along with the enumerate() function to create a new list (updated_companies) that excludes the elements at the specified indices.
Read How to Check if an Element is Not in a List in Python?
Conclusion
In this tutorial, I explored several methods to remove an element from a list by index in Python. I covered using the del keyword, the pop() method, list comprehension with enumerate() to remove multiple indices, and list slicing. Each method has its use case and can be applied depending on your specific requirements.
You may read:
- How to Slice Lists in Python?
- How to Generate a List of Random Numbers in Python?
- How to Print a List Without Brackets in Python?

I am Bijay Kumar, a Microsoft MVP in SharePoint. Apart from SharePoint, I started working on Python, Machine learning, and artificial intelligence for the last 5 years. During this time I got expertise in various Python libraries also like Tkinter, Pandas, NumPy, Turtle, Django, Matplotlib, Tensorflow, Scipy, Scikit-Learn, etc… for various clients in the United States, Canada, the United Kingdom, Australia, New Zealand, etc. Check out my profile.