The Real Python Podcast

Making Each Line of Code Efficient & Python In Excel


Listen Later

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.

Course Spotlight: Process Images Using the Pillow Library and Python

In this video course, you’ll learn how to use the Python Pillow library to deal with images and perform image processing. You’ll also explore using NumPy for further processing, including to create animations.

Topics:

  • 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
  • News:

    • Python Insider: Python 3.12.0 release candidate 1 released – “The second candidate (and the last planned release preview) is scheduled for Monday, 2023-09-04, while the official release of 3.12.0 is scheduled for Monday, 2023-10-02.”
    • Python 3.11.5, 3.10.13, 3.9.18, and 3.8.18 is now available - Python Insider
    • PSF Announces New PyPI Safety & Security Engineer
    • 2022 PSF Annual Report – The annual report from the Python Software Foundation details all the changes and events at the PSF last year.
    • Pydantic has been downloaded … 1 BILLION times! - Twitter
    • 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.
      • Discussion:

        • Make Each Line Count, Keeping Things Simple in Python – Simplicity is hard. This article talks briefly about how you approach coding while keeping things simple.
        • itertools — Functions creating iterators for efficient looping — Python documentation
        • More Itertools - more-itertools 10.1.0 documentation
        • Python enumerate(): Simplify Loops That Need Counters – Real Python
        • Python’s all(): Check Your Iterables for Truthiness – Real Python
        • How to Use any() in Python – Real Python
        • Projects:

          • Textual-paint
          • Django ORM Cheatsheet
          • Additional Links:

            • Release Python Polars 0.19.0 · pola-rs/polars
            • Episode #140: Speeding Up Your DataFrames With Polars – The Real Python Podcast
            • Episode #167: Exploring pandas 2.0 & Targets for Apache Arrow – The Real Python Podcast
            • Introducing Python in Excel 😱 - YouTube
            • Source code beautifier / syntax highlighter – convert code snippets to HTML « hilite.me
            • Level up your Python skills with our expert-led courses:

              • Building a Django User Management System
              • Process Images Using the Pillow Library and Python
              • Editing Excel Spreadsheets in Python With openpyxl
              • Support the podcast & join our community of Pythonistas

                ...more
                View all episodesView all episodes
                Download on the App Store

                The Real Python PodcastBy Real Python

                • 4.7
                • 4.7
                • 4.7
                • 4.7
                • 4.7

                4.7

                134 ratings


                More shows like The Real Python Podcast

                View all
                Hanselminutes with Scott Hanselman by Scott Hanselman

                Hanselminutes with Scott Hanselman

                377 Listeners

                Software Engineering Radio - the podcast for professional software developers by se-radio@computer.org

                Software Engineering Radio - the podcast for professional software developers

                265 Listeners

                The Changelog: Software Development, Open Source by Changelog Media

                The Changelog: Software Development, Open Source

                287 Listeners

                LINUX Unplugged by Jupiter Broadcasting

                LINUX Unplugged

                262 Listeners

                Thoughtworks Technology Podcast by Thoughtworks

                Thoughtworks Technology Podcast

                41 Listeners

                Talk Python To Me by Michael Kennedy

                Talk Python To Me

                585 Listeners

                Software Engineering Daily by Software Engineering Daily

                Software Engineering Daily

                628 Listeners

                Super Data Science: ML & AI Podcast with Jon Krohn by Jon Krohn

                Super Data Science: ML & AI Podcast with Jon Krohn

                295 Listeners

                Python Bytes by Michael Kennedy and Brian Okken

                Python Bytes

                213 Listeners

                Data Engineering Podcast by Tobias Macey

                Data Engineering Podcast

                140 Listeners

                Syntax - Tasty Web Development Treats by Wes Bos & Scott Tolinski - Full Stack JavaScript Web Developers

                Syntax - Tasty Web Development Treats

                987 Listeners

                CoRecursive: Coding Stories by Adam Gordon Bell - Software Developer

                CoRecursive: Coding Stories

                186 Listeners

                DataFramed by DataCamp

                DataFramed

                269 Listeners

                Practical AI by Practical AI LLC

                Practical AI

                190 Listeners

                The Stack Overflow Podcast by The Stack Overflow Podcast

                The Stack Overflow Podcast

                63 Listeners