Learning Python Generators

Go to class
Write Review

Free Online Course: Learning Python Generators provided by LinkedIn Learning is a comprehensive online course, which lasts for Less than 1 hour of material. The course is taught in English and is free of charge. Upon completion of the course, you can receive an e-certificate from LinkedIn Learning. Learning Python Generators is taught by Josh McQuiston.

Overview
  • Python generators are the best way to iterate through large and complex data sets. Find out how to use generators in your own code, in these Python tutorials.

Syllabus
  • Introduction

    • Welcome
    • What you should know
    • Using the exercise files
    1. Generator Functions and Expressions
    • Generators overview
    • Build a generator function
    • Use a generator expression
    • Use a generator object
    • Challenge: Fibonacci sequence generator
    • Solution: Fibonacci sequence fenerator
    • Build a generator pipeline
    2. Using Generators as Context Managers
    • Context managers overview
    • Build a context manager using yield
    • The @contextmanager decorator
    • Use the yielded value
    3. Coroutines
    • Coroutine overview
    • Create a coroutine
    • Build a @coroutine decorator
    • Consume values with the send method
    • Coroutine pipelines
    Conclusion
    • Next steps