targetlist = [0, 10, 20, 30, 40, 50, 60, 70, 80, 90] removelist = [2, 7, 5] # The code below here should remove the elements from targetlist that # are given in removelist. # # After, targetlist should be [0, 10, 30, 40, 60, 80, 90] # This code doesn't work. for elt in removelist: del targetlist[elt] print targetlist # at the moment, this prints: [0, 10, 30, 40, 50, 70, 90]