Inspired Python
◆◆◆
>>> d = {"first_name": "Cosmo", "last_name": "Kramer"}
# Create a `dict_keys` view of the keys
>>> keys = d.keys()
>>> keys
dict_keys(['first_name', 'last_name'])
# Now remove a key...
>>> del d['last_name']
# ... and now the view of the keys reflects the new contents
>>> keys
dict_keys(['first_name'])