PyCon US 2025 Tutorial Sneak Peek: "Comprehending Comprehensions" - Reuven M. Lerner
Are you confused or frustrated by comprehensions? Do you wonder about their syntax -- or even why we would use them in the first place? In my "Comprehending comprehensions" tutorial, you'll learn not only how to write comprehensions, but (more importantly) why and when to do so. We'll go through list, set, and dict comprehensions, as well as the harder-to-understand nested-comprehension syntax and generator expressions. The tutorial won't use slides: Rather, I'll use a notebook to write notes and code in real time, allowing me not only to demonstrate the code, but also to answer your questions in real time. (The notebook I use will be available both while the tutorial is going on, and afterwards.) I've been teaching Python for many years, and comprehensions remain one of the topics that most confuse developers, regardless of how long they've been using Python. After attending my tutorial, you'll not only know how to use comprehensions -- you'll actually want to do so. Joining us at PyCon US 2025? Register your spot for this tutorial today via the us.pycon.org/2025/ website! More information about PyCon US 2025 tutorials and the full schedule here: https://us.pycon.org/2025/schedule/tutorials/