← Back to the lesson: Dictionaries
Access Dictionary Values
The exercise
Given dictionary:
car = {"brand": "Toyota", "year": 2020, "color": "red"}
Print only the brand and year on separate lines.
Starter code
car = {"brand": "Toyota", "year": 2020, "color": "red"}
# Print brand / Выведите марку
# Print year / Выведите год
Write the code in the browser and run it — no installation needed.