As for your last question, here's the problem illustrated with a simple example:
Let's say that your list contains 5 elements: list = [1, 2, 3, 4, 5]
and your list of items to remove (i.e. the indices) is indices_to_remove = [0, 2, 4]
. In the first iteration of the loop you remove the item at index 0, so your list becomes list = [2, 3, 4, 5]
. In the second iteration, you remove the item at index 2, so your list becomes list = [2, 3, 5]
(as you can see, this removes the wrong element). Finally, in the third iteration, you try to remove the element at index 4, but the list only contains three elements, so you get an out of bounds exception.
Now that you see what the problem is, hopefully you will be able to come up with a solution. Good luck!