Dictionaries – Solution [2]

for to_delete in keys_to_delete:
    # need to check if is present - can not delete a key which does not exist in dictionary
    if to_delete in phones:
        del phones[to_delete]
print(phones)

or alternatively you can use pop method with a default value

for to_delete in keys_to_delete:
    phones.pop(to_delete, None) # returns None if key not present
print(phones)