Exercise: Add missing key-value pair to dictionary
Here, we're creating a dictionary called car. But, it's incomplete. Add the missing key-value pair so that
print()
outputs True
.car = {
'brand': 'Toyota',
'model': 'Corolla',
# add code here...
}
print(car['year'] == 2020)
# expected output: True
Python
Setting up Python environment...
Output