If I run this code:
a = ['bob','bob','bob','bob','bob','bob','bob']
b = ['bob']
for item in a:
if item in b:
a.remove(item)
I expect all the 'bob's to be removed, but there are 3 'bob's left. I don't understand. Someone please enlighten me, I think I may be losing my mind.