
In this lesson, we will focus on Python list pop method. We will learn how to remove any member of a list in python. We can do this with python pop method and the index of the list member. You can also check python list append method to see how to add a new member at the end of a list.
Let’s show how can we use python pop method for python list pop.
With this example, we will remove the third member of the list (index = 2). Remember, the indexes starts from 0 and continues as 1,2,3 etc. So the first member has index 0, the second memebr has index 1 and the third member has index 2. Here, we will remove third member, index 2. So, the output of this python code will be:
You can also learn other Python List Methods

You can also learn how to find Lenth of a Python List
We can also assign the removed member to a variable and then we can print it like below:
The output of this code will be the removed member:
Let’s do the similar examples with number lists.
As an output, the fourth member of the list (index=3), “76”, will be removed.
Here, we have used python pop () method for Python list pop function. You can use this method for your various python codes related with lists. You can find other list lessons in this Python Training.
Gokhan Kosem is a Network Engineer, Instructor and the Founder of IPCisco.com with 15+ years of experience in Cisco, Nokia, Huawei, Juniper, Linux, Service Provider Networks, Routing and Switching technologies.
He has worked on the backbone networks of major service providers and network vendors including Nortel, Alcatel-Lucent (Nokia) and has extensive hands-on experience with Cisco, Huawei, Juniper and Nokia networking technologies.
He has trained thousands of networking students worldwide through IPCisco.com, Udemy, books, labs, quizzes, and educational content across multiple social media platforms.
IPCisco.com | Best Route to Your Dreams
Leave a Reply