This week’s topics
Looping through data; tuples and dictionaries
- Looping through a list
- Tuples and dictionaries
What you will be able to do
- 4.1 Use lists, tuples and dictionaries.
- 4.2 Iterate over data structures to solve a problem.
Activity
Store contacts in a dictionary and print them all.
Study materials
Further resources
- Introduction to Python Programming, 9.1: Iterating lists · PDF · OpenStax Introduction to Python Programming (2024), 9.1: looping through a list, pp. 211–213 · for registered students
- Introduction to Python Programming, 3.5: Tuple basics · PDF · OpenStax Introduction to Python Programming (2024), 3.5: tuples, pp. 81–83 · for registered students
- Introduction to Python Programming, ch. 10: Dictionaries · PDF · OpenStax Introduction to Python Programming (2024), ch. 10: dictionaries and looping over them, pp. 227–247 · for registered students
- Think Python, ch. 11: Dictionaries · PDF · Downey, Think Python 2e (Green Tea Press), ch. 11: dictionaries and looping over them, pp. 103–114 · for registered students
Materials marked “for registered students” open in the student portal, which is set up as soon as you receive final acceptance.