Podbean logo
  • Discover
  • Podcast Features
    • Podcast Hosting

      Start your podcast with all the features you need.

    • Podbean AI Podbean AI

      AI-Enhanced Audio Quality and Content Generation.

    • Blog to Podcast

      Repurpose your blog into an engaging podcast.

    • Video to Podcast

      Convert YouTube playlists to podcasts, videos to audios.

  • Monetization
    • Ads Marketplace

      Join Ads Marketplace to earn through podcast sponsorships.

    • PodAds

      Manage your ads with dynamic ad insertion capability.

    • Apple Podcasts Subscriptions Integration

      Monetize with Apple Podcasts Subscriptions via Podbean.

    • Live Streaming

      Earn rewards and recurring income from Fan Club membership.

  • Podbean App
    • Podcast Studio

      Easy-to-use audio recorder app.

    • Podcast App

      The best podcast player & podcast app.

  • Help and Support
    • Help Center

      Get the answers and support you need.

    • Podbean Academy

      Resources and guides to launch, grow, and monetize podcast.

    • Podbean Blog

      Stay updated with the latest podcasting tips and trends.

    • What’s New

      Check out our newest and recently released features!

    • Podcasting Smarter

      Podcast interviews, best practices, and helpful tips.

  • Popular Topics
    • How to Start a Podcast

      The step-by-step guide to start your own podcast.

    • How to Start a Live Podcast

      Create the best live podcast and engage your audience.

    • How to Monetize a Podcast

      Tips on making the decision to monetize your podcast.

    • How to Promote Your Podcast

      The best ways to get more eyes and ears on your podcast.

    • Podcast Advertising 101

      Everything you need to know about podcast advertising.

    • Mobile Podcast Recording Guide

      The ultimate guide to recording a podcast on your phone.

    • How to Use Group Recording

      Steps to set up and use group recording in the Podbean app.

  • All Arts Business Comedy Education
  • Fiction Government Health & Fitness History Kids & Family
  • Leisure Music News Religion & Spirituality Science
  • Society & Culture Sports Technology True Crime TV & Film
  • Live
  • How to Start a Podcast
  • How to Start a Live Podcast
  • How to Monetize a podcast
  • How to Promote Your Podcast
  • How to Use Group Recording
  • Log in
  • Start your podcast for free
  • Podcasting
    • Podcast Features
      • Podcast Hosting

        Start your podcast with all the features you need.

      • Podbean AI Podbean AI

        AI-Enhanced Audio Quality and Content Generation.

      • Blog to Podcast

        Repurpose your blog into an engaging podcast.

      • Video to Podcast

        Convert YouTube playlists to podcasts, videos to audios.

    • Monetization
      • Ads Marketplace

        Join Ads Marketplace to earn through podcast sponsorships.

      • PodAds

        Manage your ads with dynamic ad insertion capability.

      • Apple Podcasts Subscriptions Integration

        Monetize with Apple Podcasts Subscriptions via Podbean.

      • Live Streaming

        Earn rewards and recurring income from Fan Club membership.

    • Podbean App
      • Podcast Studio

        Easy-to-use audio recorder app.

      • Podcast App

        The best podcast player & podcast app.

  • Advertisers
  • Enterprise
  • Pricing
  • Resources
    • Help and Support
      • Help Center

        Get the answers and support you need.

      • Podbean Academy

        Resources and guides to launch, grow, and monetize podcast.

      • Podbean Blog

        Stay updated with the latest podcasting tips and trends.

      • What’s New

        Check out our newest and recently released features!

      • Podcasting Smarter

        Podcast interviews, best practices, and helpful tips.

    • Popular Topics
      • How to Start a Podcast

        The step-by-step guide to start your own podcast.

      • How to Start a Live Podcast

        Create the best live podcast and engage your audience.

      • How to Monetize a Podcast

        Tips on making the decision to monetize your podcast.

      • How to Promote Your Podcast

        The best ways to get more eyes and ears on your podcast.

      • Podcast Advertising 101

        Everything you need to know about podcast advertising.

      • Mobile Podcast Recording Guide

        The ultimate guide to recording a podcast on your phone.

      • How to Use Group Recording

        Steps to set up and use group recording in the Podbean app.

  • Discover
  • Log in
    Sign up free
The Real Python Podcast

The Real Python Podcast

Technology

Generators, Coroutines, and Learning Python Through Exercises

Generators, Coroutines, and Learning Python Through Exercises

2020-12-11
Download Right click and do "save link as"

Have you started to use generators in Python? Are you unsure why you would even use one over a regular function? How do you use the special “send” method and the “yield from” syntax? This week on the show, we have Reuven Lerner to talk about his PyCon Africa 2020 talk titled “Generators, coroutines, and nanoservices.”

Reuven helps developers around the world become more fluent in Python. We talk about some of his teaching techniques and also how he continues to learn. Reuven is a believer in the continued practice of Python through exercises. We discuss his book “Python Workout” and his Weekly Python Exercise courses.

Course Spotlight: Python Generators 101

In this step-by-step course, you’ll learn about generators and yielding in Python. You’ll create generator functions and generator expressions using multiple Python yield statements. You’ll also learn how to build data pipelines that take advantage of these Pythonic tools.

Topics:

  • 00:00:00 – Introduction
  • 00:01:38 – Reuven’s web site: Teaching Python and Data Science around the world
  • 00:03:39 – Training remotely and screen-time overload
  • 00:07:03 – Info-tainment and sparking engagement
  • 00:11:05 – PyCon Africa 2020 - Generators, Coroutines, and Nanoservices
  • 00:13:34 – Using dis() - disassembler for Python bytecode
  • 00:15:09 – Exceptions as signals, not exclusively for errors
  • 00:17:39 – What makes generator functions different?
  • 00:22:05 – Using .send() and creating a coroutine
  • 00:23:39 – Sponsor: Scout APM
  • 00:24:40 – Stopping the generator with .throw()
  • 00:26:28 – Additional uses for generators
  • 00:30:03 – Python Workout: 50 ten-minute exercises
  • 00:34:22 – A combination of techniques and sources for continued learning
  • 00:40:15 – Weekly Python Exercise
  • 00:42:02 – Video Course Spotlight
  • 00:43:08 – Bachelor degree in CS, but a Doctorate in learning sciences
  • 00:48:26 – What are additional techniques you use to keep learning?
  • 00:50:18 – Teaching is a great way to keep learning
  • 00:51:28 – What areas of data science are you focusing on?
  • 00:53:22 – The Business of Freelancing: podcast
  • 00:56:26 – What is something you thought you knew about Python, but were wrong about?
  • 00:59:24 – What is something you are excited about in the world of Python?
  • 01:02:18 – Conferences and user groups
  • 01:05:03 – Thanks and goodbye

Show Links:

  • Teaching Python and Data Science around the world: Reuven’s Training Site
  • Reuven’s newsletter
  • Generators, Coroutines, and Nanoservices: Pycon Africa 2020
  • PEP 255 – Simple Generators: Python docs
  • How to Use Generators and yield in Python: Real Python article
  • dis — Disassembler for Python bytecode: Python docs
  • Exception Handling: Python docs
  • Python Workout : 50 ten-minute exercises - Manning
  • Weekly Python Exercise Course
  • Luis Serrano: machine learning & math made easy - YouTube channel
  • The Business of Freelancing: Podcast
  • RPP Episode 29: Resolving Package Dependencies With the New Version of Pip
  • Sign-up for pip UX Studies!

Level up your Python skills with our expert-led courses:

  • Grow Your Python Portfolio With 13 Intermediate Project Ideas
  • Python Generators 101
  • Speed Up Python With Concurrency

Support the podcast & join our community of Pythonistas

view more

More Episodes

Design Patterns That Don't Translate to Python
2025-08-01
Supporting the Python Package Index
2025-07-25
Comparing Real-World Python Performance Against Big O
2025-07-11
Solving Problems and Saving Time in Chemistry With Python
2025-07-04
Structuring Python Scripts & Exciting Non-LLM Software Trends
2025-06-27
Scaling Python Web Applications With Kubernetes and Karpenter
2025-06-20
Starting With marimo Notebooks & Python App Config Management
2025-06-13
Rodrigo Girão Serrão: Python Training, itertools, and Idioms
2025-06-06
Python Thread Safety & Managing Projects With uv
2025-05-30
DjangoCon Europe 2025: Live Recording From Dublin
2025-05-23
Going Beyond requirements.txt With pylock.toml and PEP 751
2025-05-16
Experiments With Gen AI, Knowledge Graphs, Workflows, and Python
2025-05-09
Exploring DuckDB & Comparing Python Expressions vs Statements
2025-04-18
Learning Intermediate Python With a Deep Dive Course
2025-04-11
GUIs & TUIs: Choosing a User Interface for Your Python Project
2025-04-04
A Decade of Automating the Boring Stuff With Python
2025-03-21
Manage Projects With pyproject.toml & Explore Polars LazyFrames
2025-03-14
Eric Matthes: Maybe Don't Start With Unit Tests
2025-03-07
Deciphering Python Jargon & Compiling Python 1.0
2025-02-28
Telling Effective Stories With Your Python Visualizations
2025-02-21
  • ←
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • →
012345678910111213141516171819

Get this podcast on your
phone, FREE

Download Podbean app on App Store Download Podbean app on Google Play

Create your
podcast in
minutes

  • Full-featured podcast site
  • Unlimited storage and bandwidth
  • Comprehensive podcast stats
  • Distribute to Apple Podcasts, Spotify, and more
  • Make money with your podcast
Get started

It is Free

  • Podcast Services

    • Podcast Features
    • Pricing
    • Enterprise Solution
    • Private Podcast
    • The Podcast App
    • Live Stream
    • Audio Recorder
    • Remote Recording
    • Podbean AI
  •  
    • Create a Podcast
    • Video Podcast
    • Start Podcasting
    • Start Radio Talk Show
    • Education Podcast
    • Church Podcast
    • Nonprofit Podcast
    • Get Sermons Online
    • Free Audiobooks
  • MONETIZATION & MORE

    • Podcast Advertising
    • Dynamic Ads Insertion
    • Apple Podcasts Subscriptions
    • Switch to Podbean
    • YouTube to Podcast
    • Blog to Podcast
    • Submit Your Podcast
    • Podbean Plugins
    • Developers
  • KNOWLEDGE BASE

    • How to Start a Podcast
    • How to Start a Live Podcast
    • How to Monetize a Podcast
    • How to Promote Your Podcast
    • Mobile Podcast Recording Guide
    • How to Use Group Recording
    • Podcast Advertising 101
  • Support

    • Support Center
    • What’s New
    • Free Webinars
    • Podcast Events
    • Podbean Academy
    • Podbean Amplified Podcast
    • Badges
    • Resources
  • Podbean

    • About Us
    • Podbean Blog
    • Careers
    • Press and Media
    • Green Initiative
    • Affiliate Program
    • Contact Us
  • Privacy Policy
  • Cookie Policy
  • Terms of Use
  • Consent Preferences
  • Copyright © 2015-2025 Podbean.com