← Back to the lesson: Dictionaries
Add to Dictionary
The exercise
Start with: book = {"title": "Python"}
Add two new keys:
- "author": "John"
- "pages": 300
Print the updated dictionary.
Starter code
book = {"title": "Python"}
# Add author / Добавьте автора
# Add pages / Добавьте страницы
# Print / Выведите
Write the code in the browser and run it — no installation needed.