Summary
In this chapter, you've learned how even though there is often more than one way to do something in Python, there is often a "Pythonic" way. The Pythonic way is succinct and easy to understand, leaving out boilerplate code and extraneous information to focus on the task at hand. Comprehensions are a Pythonic tool for manipulating collections, including lists, sets, and dictionaries. Comprehensions are powered by iterators, which can be written as classes or as generator functions that yield the iterated values. The Python library includes useful functions for working with iterators, including infinite sequences expressed as iterators.
In the next chapter, you'll move past the details of the Python language and into how to work as a professional Python programmer. You'll see how to debug your Python code, write unit tests, and document, package, and share your Python code with other coders.