Remove Items While Iterating

# Introduction In Python, to remove an item from a list while iterating, you need to be careful since removing an item changes the length of the list and the index of the remaining elements. In this challenge, we will discuss how to remove items from a list while iterating without creating a different copy of the list.

|60 : 00

Click the virtual machine below to start practicing