Skip to main content
Ctrl+K
Jörg Faschingbauer - Home Jörg Faschingbauer - Home
  • Training Courses
  • About
  • Blog
  • Training Courses
  • About
  • Blog

Section Navigation

  • Course Descriptions
  • Pricing, Organizational
  • Log Of Past Courses
  • Complete Slide Material
    • Linux
    • Python Programming
      • Python: The Language Fundamentals
      • Python: More Language Features
        • Comprehensions (List, Dictionary, Set)
        • Exception Handling
        • Iterating Intelligently: Generators, and the Iterator Protocol
        • Positional and Keyword Arguments
        • Closures
        • Decorators
        • Context Managers: The with Statement
        • The exec() Function
        • Object Oriented Programming
        • Modules and Packages
        • Multithreading
      • Python: Project/Package Management
      • Python: Miscellaneous Topics
      • Python: Draft Topics
      • Python Links
      • Exercises
    • The C Programming Language
    • C++ < 11
    • C++ >= 11
    • Design Patterns With C++
    • C++: TODO List
    • C++: Miscellaneous Live-Hacking
    • C++ Code
    • C++ Exercises
    • CMake
    • Is Software A Craft? Software Is A Craft! ⟶ Clean Code
    • Unit Testing With googletest
  • Training Courses
  • Complete Slide Material
  • Python Programming
  • Python: More Language Features
  • Iterating Intelligently: Generators, and the Iterator Protocol

Iterating Intelligently: Generators, and the Iterator Protocol#

  • Iteration, Comprehensions, and Generators
    • Coverage Of This Topic
    • for Recap: Sequential Datatypes
    • Primitive Transformation [1,2,3,4] ⟶ [1,4,9,16]
    • List Comprehension
    • Larger Input List (Still Allocated)
    • Input List ⟶ range
    • Output List ⟶ yield
    • Generator Function ⟶ Generator Expression
  • Iteration, Generators, And yield
    • The Iterator Protocol
      • Iteration in Python
      • What’s an Iterator?
      • What’s an Iterable?
      • The Iterator Protocol
      • The Iterator Protocol: Manual Iteration
      • The Iterator Protocol, And The for Loop
      • Generators: Motivation
      • Generators: How?
      • Observations
    • Implementing A Fibonacci Number Generator
      • Fibonacci Numbers: Naive List
      • Fibonacci Numbers: Naive List, Limited
      • Sideway: Infinity by Not Using Functions
      • Fibonacci Numbers: Function Producing Infinite Sequence
      • Common Pattern: Turn List into Generated Items

© Copyright 2019-2025 (GPLv3), Jörg Faschingbauer.

Created using Sphinx 8.1.3.

Built with the PyData Sphinx Theme 0.16.1.

Show Source