Quarry School

Lists and dictionaries

Subject: ComputingLevel 1 · estimated

Keep 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

Quick review

Read the whole unit on one page

  1. Build an ordered listSubject: ComputingLevel 1 · Foundations
  2. Update an item by indexSubject: ComputingLevel 1 · Foundations
  3. Look up a keySubject: ComputingLevel 1 · Foundations
  4. Count repeated labelsSubject: ComputingLevel 1 · Foundations
  5. Choose a list or dictionary for a rosterSubject: ComputingLevel 1 · Foundations

Sources

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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.
  7. 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.
  8. 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.
  9. 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.
  10. 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.