Let’s check out some exercises that will help understand dictionaries better.
Dictionaries don't have index orders, so speaking about them regarding their first item or last item is not very correct. Next time you print a dictionary it may have a different order than you saw before. Instead they have keys, and we can use keys to call their values.
When was Plato born?
Change Plato's birth year from B.C. 427 to B.C. 428.
You can just use -428 unless you’d like to use a string format such as: “B.C. 428”
In dictionaries later values will always override previous values for the same key.
If you type the new value for the key you’d like to change it will be replaced.
To address a specific key in dictionaries:
dict[“key”]
dict["born"] = -428
Dictionaries can have nested data too. Also, you can add a new key to a dictionary as they are mutable (changeable). Try to add the key "work" to dict with values shown below.
"work": ["Apology", "Phaedo", "Republic", "Symposium"]