person = {
'name': 'Bob',
'age': 30,
'city': 'New York'
}
def does_key_exist(key):
# add check here:
print(key, 'exists')
else:
print(key, 'does not exist')
does_key_exist('age')
does_key_exist('zipcode')
Python
Setting up Python environment...
Output