From 242826b133c300fd2cac02745315c2fe2244b9bb Mon Sep 17 00:00:00 2001 From: cheeks <134818917+leftovertoast@users.noreply.github.com> Date: Fri, 31 Jan 2025 08:26:31 -0500 Subject: [PATCH] Completed 6-9 Favorite Places --- Chapter_06/6-09_favorite_places.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Chapter_06/6-09_favorite_places.py 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