Looking Things Up
Find values by key.
Looking Things Up 🔍
A dictionary lets you look up a value by its key, super fast! Like finding a word in a real dictionary. 📖
Use the Key 🔑
Put the key in square brackets to grab its value.
hero = {"name": "Zara", "power": "fly"}
print(hero["power"])All lessons in this course
- What Is a Dictionary?
- Looking Things Up
- Adding and Changing
- A Mini Phone Book