>>> n = 0
>>> a_list = ['a','p','l','e']
>>> a_list.insert(1,'a')
>>> a_list.insert(3,'p')
>>> for a in a_list: # I want to del all 'a'
... if(a == 'a'):
... del a_list[n]
... n = n + 1
... print(a)
...
a
p
p
l
e
Here I want to del all 'a' s after inserting a and p. but the result is not want I expected. I suspect its interpreter have specific order of del and insert. The it might not del all 'a'