Exercise: Access nested dictionary value
Which city does Bob live in? Get the value from the nested dictionary and assign it to the variable city.
person = {
'name': 'Bob',
'age': 30,
'address': {
'city': 'New York',
'zipcode': '10001'
}
}
# access nested dictionary value here...
city =
print(city)
# expected: New York
Python
Setting up Python environment...
Output