Lists and dictionaries
Level 1 · estimatedKeep many values under one name: a list in order, and a dictionary by key. Change an item, look up a key, count repeated labels, and choose the right one for a job.
Lessons
Read the whole unit on one page
- Build an ordered listLevel 1 · Foundations
- Update an item by indexLevel 1 · Foundations
- Look up a keyLevel 1 · Foundations
- Count repeated labelsLevel 1 · Foundations
- Choose a list or dictionary for a rosterLevel 1 · Foundations
Sources
- Python 3.13 Tutorial, 3.1.3 Lists. Python Software Foundation. Python Software Foundation License Version 2. Read 2 Dec 2026. Cited in Build an ordered list, Update an item by index, Choose a list or dictionary for a roster.
- Python 3.13 Library Reference, Built-in Exceptions: IndexError. Python Software Foundation. Python Software Foundation License Version 2. Read 2 Dec 2026. Cited in Build an ordered list, Update an item by index, Choose a list or dictionary for a roster.
- Python 3.13 Tutorial, 4.2 for Statements. Python Software Foundation. Python Software Foundation License Version 2. Read 2 Dec 2026. Cited in Build an ordered list, Count repeated labels.
- Python 3.13 Tutorial, 5.1 More on Lists. Python Software Foundation. Python Software Foundation License Version 2. Read 2 Dec 2026. Cited in Update an item by index, Count repeated labels, Choose a list or dictionary for a roster.
- Python 3.13 Tutorial, 3.1.2 Text. Python Software Foundation. Python Software Foundation License Version 2. Read 2 Dec 2026. Cited in Update an item by index.
- Python 3.13 Tutorial, 5.5 Dictionaries. Python Software Foundation. Python Software Foundation License Version 2. Read 2 Dec 2026. Cited in Look up a key, Count repeated labels, Choose a list or dictionary for a roster.
- Python 3.13 Library Reference, Built-in Exceptions: KeyError. Python Software Foundation. Python Software Foundation License Version 2. Read 2 Dec 2026. Cited in Look up a key, Count repeated labels.
- Python 3.13 Language Reference, 8.1 The if statement. Python Software Foundation. Python Software Foundation License Version 2. Read 2 Dec 2026. Cited in Count repeated labels.
- Python 3.13 Language Reference, 7.2.1 Augmented assignment statements. Python Software Foundation. Python Software Foundation License Version 2. Read 2 Dec 2026. Cited in Count repeated labels.
- Python 3.13 Library Reference, Built-in Types: Common Sequence Operations. Python Software Foundation. Python Software Foundation License Version 2. Read 2 Dec 2026. Cited in Choose a list or dictionary for a roster.