Contribute Media
A thank you to everyone who has made this possible: Read More

Comprehensible Comprehensions

Description

Finding list comprehensions incomprehensible? Having trouble figuring out when to use list comprehensions or just plain for loops? Come to this talk and learn the how, when, and why of list comprehensions.

Finding list comprehensions incomprehensible? Having trouble figuring out when to use list comprehensions or just plain for loops?

If you find comprehensions tricky to write or perplexing to read, this talk is for you.

We're going to learn:

  • when and how to turn a for loop into a comprehension
  • why list comprehensions are often hard to read
  • how to use list, set, an dictionary comprehensions as well as generator expressions
  • how to make your comprehensions even more readable than your loops
  • when and how not to use comprehensions

You'll come away from this talk with a cheat sheet for helping you remember when and how to use comprehensions.

Details

Improve this page