Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

CodeSignal

Generators and Iterators in Python

via CodeSignal

Overview

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.

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

Reviews

Start your review of Generators and Iterators in Python

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.