Completed 6-9 Favorite Places
This commit is contained in:
parent
027b7fd4d5
commit
242826b133
13
Chapter_06/6-09_favorite_places.py
Normal file
13
Chapter_06/6-09_favorite_places.py
Normal 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()}")
|
||||||
Loading…
x
Reference in New Issue
Block a user