A dictionary maps keys to values, like a lookup table: prices = {"latte": 3.90, "mocha": 4.20}. prices["latte"] gives 3.9. Keys must match exactly: "Latte" is a different key, and asking for a key that isn't there raises KeyError.
prices.get("chai", 0) gives a default instead of an error, which is the safe way to read a key that might be missing.
Assigning to a key adds it, or replaces its value if it's already there: prices["chai"] = 3.50. "chai" in prices checks whether a key exists, and len(prices) counts the keys.
.keys(), .values() and .items() give you the keys, the values, and (key, value) pairs, so sum(prices.values()) adds every value. Looping over a dictionary itself gives its keys. Dictionaries keep keys in the order you added them.