Features
Lesson 2 of 14 in Coddy's Dictionary in Python course.
Dictionary items are ordered, changeable, and does not allow duplicates.
Let's understand each of the points:
- Ordered - it means that the items have a defined order, and that order will not change.
- Changeable - it means that we can change, add or remove items after the dictionary has been created.
- No duplicates - dictionaries cannot have two items with the same key.
thisdict = {
"brand": "Ford",
"model": "Mustang",
"year": 1964,
"year": 2020
}thisdict dictionary will hold the value 2020 under the key "year".
Try it yourself
This lesson doesn't include a code challenge.