Lists & dictionaries

Lists hold ordered items; dictionaries map keys to values. Both are everywhere in data work.

Lists use `[ ]`, grow with `.append()`, index from 0, and can be sliced with `[a:b]`. Dictionaries use `{ }` and look items up by key. `len()` counts either.

planets = ["Mercury", "Venus", "Earth"]
planets.append("Mars")
print(planets[3], len(planets))

More lessons in Control flow & functions