to_remove = []
for index, s in enumerate(list):
    if s == 'b' or s == 'c':
        to_remove.append(index)
for index in reversed(to_remove):
    del list[index]
how to correctly modify the iterator of a loop in python from within the loop