∟Iterators and Generators

This chapter provides introductions and tutorial examples about iterators and generators. Topics include introduction on iterable objects, iterators and generators; list of built-in iterable data types; using 'yield' statements and generator functions; using generator expressions.

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

Takeaways:

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 and Generators

 List, Set and Dictionary 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

 SciPy.org - Python Libraries for Science

 pandas - Data Analysis and Manipulation

 Communicating with HTTPS Servers

 tinyec - Tiny Library for ECC

 Generating EC Public-Private Keys

 Anaconda - Python Environment Manager

 Jupyter Notebook and JupyterLab

 References

 Full Version in PDF/EPUB