Adding and Changing
Update your word boxes.
Adding and Changing ✏️
Dictionaries are not frozen! You can add new drawers and change what is inside. 🔧
Add a New Pair ➕
Use a new key in square brackets and give it a value!
pet = {"name": "Rex"}
pet["age"] = 4
print(pet)All lessons in this course
- What Is a Dictionary?
- Looking Things Up
- Adding and Changing
- A Mini Phone Book