Why not doing like this?
>>> sw = ['go', 'bo', 'bo', 'bo', 'bo'] >>> for i in range(0, sw.count("bo")): ... sw.remove("bo") ... >>> sw ['go']Well, ichabod was faster and more clever using while-loop