diff --git a/Chapter_06/6-09_favorite_places.py b/Chapter_06/6-09_favorite_places.py new file mode 100644 index 0000000..047ba31 --- /dev/null +++ b/Chapter_06/6-09_favorite_places.py @@ -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()}") \ No newline at end of file