Reach out to me on Twitter @mathsppblog and subscribe to my newsletter to level up your Python knowledge!
Comprehending Comprehensions
In this short talk, I will introduce all the key ideas necessary for you to finally understand comprehensions: list, dict, and set comprehensions, plus generator expressions.
I will explain the key argument in favour of list comprehensions and I will show how to turn any suitable loop into its equivalent comprehension.
By the time the talk is over, you'll be much closer to getting your black belt in comprehension-fu.
References
You can get the ebook “Comprehending Comprehensions” and you can find the talk slides on GitHub.
