13 lines
393 B
Python
13 lines
393 B
Python
# Exercise 6-9 Favorite Places
|
|
# Learning Objective: Nest a list in a dictionary.
|
|
|
|
favorite_places = {
|
|
'Kevin': ['Toronto', 'Quebec', 'Ontario'],
|
|
'Ezekiel': ['Bethlehem', 'Utah', 'Colorado'],
|
|
'Henry': ['Chicago', 'Indianapolis'],
|
|
}
|
|
|
|
for person, place in favorite_places.items():
|
|
print(f"\n{person.title()}'s favorite places are: ")
|
|
for a_place in place:
|
|
print(f"\t{a_place.title()}") |