'age'
:
43
,
'city'
:
'sitka'
,
}
(person[
'first_name'
])
(person[
'last_name'
])
(person[
'age'
])
(person[
'city'
])
Output:
eric
matthes
43
sitka
6-2: Favorite Numbers
Use a dictionary to store people’s favorite numbers. Think of five
names, and use them as keys in your dictionary. Think of a favorite
number for each person, and store each as a value in your dictionary.
Print each person’s name and their favorite number. For even more
fun, poll a few friends and get some actual data for your program.