Real Python Podcast Episode #171 Title Artwork

Episode 171: Making Each Line of Code Efficient & Python In Excel

The Real Python Podcast

Sep 08, 2023 50m

Are you writing efficient Python with as few lines of code as possible? Are you familiar with the many built-in language features that will simplify your code and make it more Pythonic? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder’s Weekly articles and projects.

We discuss a recent post from Bob Belderbos titled “Make Each Line Count, Keeping Things Simple in Python.” We provide many of our favorite Pythonic examples and the language mistakes that we’ve learned from. We also share multiple resources to add to your learning path.

Microsoft has announced a limited beta program for Python in Excel. We dig into the current details, requirements, and potential use cases.

We cover several other articles and projects from the Python community, including a group of announcements from the Python Software Foundation, a showcase of the Polars DataFrame library, immortal objects in Python, a code image generator Python project, an MS Paint clone in the terminal, and a Django ORM cheatsheet.


  • 00:00:00 – Introduction
  • 00:02:10 – Python 3.12.0 release candidate 1 released
  • 00:02:53 – PSF Announces New PyPI Safety & Security Engineer
  • 00:03:44 – 2022 PSF Annual Report
  • 00:04:13 – Pydantic has been downloaded … 1 BILLION times!
  • 00:04:28 – Python Polars: A Lightning-Fast DataFrame Library
  • 00:12:26 – Introducing Immortal Objects for Python
  • 00:15:32 – Video Course Spotlight
  • 00:17:01 – Introducing Python in Excel
  • 00:26:34 – Build a Code Image Generator With Python
  • 00:31:49 – Make Each Line Count, Keeping Things Simple in Python
  • 00:44:08 – Textual-paint
  • 00:46:04 – Django ORM Cheatsheet
  • 00:49:48 – Thanks and goodbye


Show Links:

  • Python Polars: A Lightning-Fast DataFrame Library – Welcome to the world of Polars, a powerful DataFrame library for Python! In this showcase tutorial, you’ll get a hands-on introduction to Polars’ core features and see why this library is catching so much buzz.
  • Introducing Immortal Objects for Python – This article explains immortal objects (PEP 683), which are excluded from garbage collection. This causes performance and shared memory improvements for large architectures.
  • Introducing Python in Excel – Microsoft has announced that they’re embedding Python in Excel through a partnership with Anaconda. Read on for details.
  • Build a Code Image Generator With Python – In this step-by-step tutorial, you’ll build a code image generator that creates nice-looking images of your code snippets to share on social media. Your code image generator will be powered by the Flask web framework and include exciting packages like Pygments and Playwright.



Additional Links: