This course will introduce you to the essential concepts of generators and iterators in Python. You will learn how to work with these constructs to efficiently handle large datasets and create clean and readable code.
Overview
Syllabus
- Lesson 1: Introduction to Iterators
- Modify the Counter to Count Down
- Update the Counter class to include a step parameter
- Create a RangeSquare Iterator
- Implementing a Custom Range Iterator with Skips
- Fix the Rocket Launch Countdown Timer
- Lesson 2: Introduction to Generators
- Switching to Generators
- Create a Generator for Squared Numbers
- Generator for Even Numbers
- Using Part of a Generator with Next Method
- Generate Squares of Even Numbers
- Generating Available Books in Library
- Log File Reader Generator
- Lesson 3: Generating Infinite Sequences
- Start the Infinite Counter from a Given Value
- Infinite Fibonacci Sequence Generator
- Cyclic Generator for Counting from a to b
- Lesson 4: Using Generators in Functional Programming
- Infinite Even Number Squares Generator
- Prime Number Generator with Filter
- Calculating Product Using Generators and Reduce
- Processing Transactions with Generators and Functional Programming
- City Temperature Analysis Using Generators and Functional Programming
- Processing Log Files with Generators and Functional Programming