Completed 6-9 Favorite Places

This commit is contained in:
cheeks 2025-01-31 08:26:31 -05:00
parent 027b7fd4d5
commit 242826b133

View File

@ -0,0 +1,13 @@
# 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()}")