Nov 06: Comprehensions
Meet in EnGeo 2208
Learning Objectives
After today's class, you should be able to:
- Explain the syntax and meaning of a list/set/dict comprehension.
- Rewrite a short accumulation loop as a comprehension.
- Describe when a comprehension is clearer than a loop.
Lesson Outline
Presentation [10 min]
- Building a large dictionary by reading a file
Activity [40 min]
Your To-Do List
- Required before Monday's class:
- Parts A and B of PA4: SoDuckYou
- Don't use AI; visit TA Hours to get help
- Make some progress on PyTrail