def remove_by(keys, original):
for i in [<EOL>original[index]<EOL>for index, needed in enumerate(keys) if not needed<EOL>]:<EOL><INDENT>original.remove(i)<EOL><DEDENT>
Remove items in a list according to another list.