Iterators, Generators and List Comprehensions

This chapter provides introductions and tutorial examples about iterators, generators and list comprehensions. Topics include introduction on iterable objects, iterators, generators, and list comprehensions; list of built-in iterable data types; using 'yield' statements and generator functions; using generator expressions and list 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 Iterator Object

What Is Iterable Object

Iterable Objects of Built-in Data Types

What Is Generator Iterator

What Is Generator Expression

What Is Filtered Generator Expression

What Is Double-Generator Expression

What Is List Comprehension

What Is Filtered List Comprehension

What Is Double-List Comprehension

Generator Expression vs. List Comprehension


Table of Contents

 About This Book

 Running Python Code Online

 Python on macOS Computers

 Python on Linux Computers

 Built-in Data Types

 Variables, Operations and Expressions

 Statements - Execution Units

 Function Statement and Function Call

Iterators, Generators and List Comprehensions

 Classes and Instances

 Modules and Module Files

 Packages and Package Directories

 "sys" and "os" Modules

 "pathlib" - Object-Oriented Filesystem Paths

 "pip" - Package Installer for Python - Python Libraries for Science

 pandas - Data Analysis and Manipulation

 Anaconda - Python Environment Manager

 Jupyter Notebook and JupyterLab


 Full Version in PDF/EPUB