Inspired Python
◆◆◆
>>> d = {"first_name": "Cosmo", "last_name": "Kramer"}
>>> keys = d.keys()
# dict_keys inherits from the Set abstract base class
>>> isinstance(keys, collections.abc.Set)
True
# Check that the set containing "first_name" is a subset of keys
>>> {"first_name"} < keys
True
# Unions also work
>>> {"age"} | keys
{'age', 'first_name', 'last_name'}
# As do intersections
>>> {"last_name", "address", "website"} & keys
{'last_name'}