Linux und Open Source
Quick search
Navigation
Schulungen
Kursangebot
Unterlagen & Download
Topics
Python Programming: From Absolute Beginner to Advanced Productivity
Python: The Language Fundamentals
Python: More Language Features
Comprehensions (List, Dictionary, Set)
Exception Handling
Iterating Intelligently: Generators, and the Iterator Protocol
Iteration, Comprehensions, and Generators
Iteration, and Generators: the
yield
Keyword
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
PCAP Exam
Python: All Material, Interrelated
Exercises
The C Programming Language
C++: TODO List
C++: Miscellaneous Live-Hacking
C++ 03
C++ 11
Design Patterns With C++
C++ Code
C++ Exercises
Linux
Unit Testing
Linux Kernel Driver Development
Generated Topic Graph
Organisatorisches
Datenschutz
Bisher Gehaltene
About
Über Mich
About This Site
Blog
Posts
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, and Generators: the
yield
Keyword