Lesson 12: Dictionaries
Dictionaries connect two things, like a word and its meaning.
Structure
Use curly brackets {} and colons :.
grades = {"Mario": 8, "Luigi": 9}
print(grades["Mario"])Your Objective
Create a 'phonebook' dictionary.
Dictionaries connect two things, like a word and its meaning.
Use curly brackets {} and colons :.
grades = {"Mario": 8, "Luigi": 9}
print(grades["Mario"])Create a 'phonebook' dictionary.