In the last post we looked at Python list comprehensions, an inline alternative to for-next loops. List comprehensions are a powerful technique for creating and processing lists.
In this post, we’ll look at more list comprehensions, including some real-life examples, and look at three other kinds of Python comprehensions: sets, dictionaries, and generators.