2.1 What Are Comprehensions?
As you continue to work with the Python language, you will find that often many roads lead to the same destination. The art is in finding which way works better for you.
Comprehensions are one of those alternate routes. Think of a comprehension as a shorthand way to create collections such as lists, dictionaries, and sets. In this lesson I'll explain how they're good for cutting out a lot of extraneous code. I'll start with some naive code that we can improve upon in later lessons.