Python Tutorials - Herong's Tutorial Examples - v2.15, by Herong Yang
List, Set and Dictionary Comprehensions
This chapter provides introductions and tutorial examples about list, set and dictionary comprehensions. Topics include introduction on list, set and dictionary comprehensions; examples of comprehensions with filtering conditions and nested loops, comparison of generator expressions and comprehensions.
These sections are omitted from this Web preview version. To view the full content, see information on how to obtain the full version this book.
What Is Comprehension
What Is List Comprehension
What Is Filtered List Comprehension
What Is Double-List Comprehension
What Is Set Comprehension
What Is Dictionary Comprehension
Generator Expression vs. Comprehension
Takeaways:
Table of Contents
Variables, Operations and Expressions
Function Statement and Function Call
►List, Set and Dictionary Comprehensions
Packages and Package Directories
"pathlib" - Object-Oriented Filesystem Paths
"pip" - Package Installer for Python
SciPy.org - Python Libraries for Science
pandas - Data Analysis and Manipulation
Anaconda - Python Environment Manager