Please enable JavaScript to use CodeHS

Utah Introduction to Python 2

Lesson 2.5 Removing List Elements

Description

In this lesson, students learn various ways to remove items from an existing list with the use of the pop and remove methods and the del keyword.


Objective

Students will be able to:

  • Use the pop method with no argument to remove an item from the end of a list
  • Use the pop method to remove an item from a specific index in a list
  • Use the remove method to remove a specific item from a list
  • Use the del keyword to remove an item from a specific index in a list