Hi,
your "error" is a very common source of confusion

Let's take a slightly simpler example:
In [1]: lst = ["a", "b", "b", "d"]
In [2]: for elem in lst:
....: print "before: ", lst # check the list
....: print elem, lst.index(elem) # check which element we are using
....: if elem == "b": # remove if element is a "b"
....: lst.remove(elem)
....: print "after: ", lst # check list again
....: print "-" * 20
....:
before: ['a', 'b', 'b', 'd']
a 0
after: ['a', 'b', 'b', 'd']
--------------------
before: ['a', 'b', 'b', 'd']
b 1
after: ['a', 'b', 'd']
--------------------
before: ['a', 'b', 'd']
d 2
after: ['a', 'b', 'd']
--------------------
Ok, let's go through the output step by step:
before: ['a', 'b', 'b', 'd']
a 0
after: ['a', 'b', 'b', 'd']
The first element in our list as an "a", it has the index 0 (the first index). It's not a "b" so we don't remove it and our list looks the same as before. Step 2:
before: ['a', 'b', 'b', 'd']
b 1
after: ['a', 'b', 'd']
Yeah, some action here! We are checking element number 2, with index 1, and it's a b -> remove it. Our list has now 3 elements ... alarm bells ringing? Let's look at Step 3:
before: ['a', 'b', 'd']
d 2
after: ['a', 'b', 'd']
See what happened? There is still a "b" here, but it is the second element, index 1. We already did something with the second element, in step 2. Now we are checking element number 3. It's a "d", so it stays and ... the loop is finished. Because we deleted one element, we jumped over one "b".
Thats what happens in your code.
What did we learn: Never delete something from or add something to the list you are iterating over.
The solution is: iterate over your original list, and put everything which passes your test into another list:
lst2 = [ elem for elem in lst if elem != "b" ]
Regards, mawe