Tutorials: Comprehending comprehensions

Wednesday - April 19th, 2023 1:30 p.m.-5 p.m. in 250AB

Presented by:


Experience Level:

Just starting out

Description

Comprehensions are one of the most important — and misunderstood — parts of Python. In this tutorial, I'll walk you through comprehensions, including how to write them, and why you would want to do so. By the time you finish this tutorial, you'll fully understand list, set and dict comprehensions, as well as nested comprehensions and generator expressions. You'll understand the differences between regular "for" loops and comprehensions, and where to use them.