If there's a list like below
s=['b','a','r','r','i','s','t','e','r']
and if I tried to remove every 'r' from the list like this
>>> for x in s:
if(x=='r'):
s.remove(x)
it gives the following result.
>>> s
['b', 'a', 'i', 's', 't', 'e', 'r']
Why isn't the last 'r' removed from the list.