## Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

### Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

# Why calling remove method on the master list doesn't remove all the elements?

I don't understand this "YOU MUTATE THE LIST WHILE LOOPING OVER IT", list = ['Here', 'There', 'How', 'Wow'] for v in list: list.remove(v) #why it doesn't remove all the elements? as shown in the video? why do we have to make a copy of the list to remove all the elements? Would anyone please tell me what's the concept behind it?

Just checked the other post and had this issue figured out. Basically when your removal iteration starts, the most-left item will be removed, creating a new indexing for the list, which creates problem for the on-going loop order.

Assume this is your original list,

```list = ["1", "2", "3", "4", "5"]
```

and what happens when your loop starts is: list.remove([0]), hence your list become:

```list = ["2", "3", "4", "5"]
```

but then the loop does not stop, it will do: list.remove([1]) to the code above, hence your list become:

```list = ["2", "4", "5"]
```

but then the loop still does not stop, it will do: list.remove([2]) to the code above, hence your list become:

```list = ["2", "4"]
```

then the loop still still does not stop, it will do: list.remove([3]) to the code above, which your list does not have anymore, hence your list stays the same and the loop ends:

```list = ["2", "4"]
```