<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

  <title>Real Python</title>
  <link href="https://realpython.com/atom.xml" rel="self"/>
  <link href="https://realpython.com/"/>
  <updated>2026-09-13T14:00:00+00:00</updated>
  <id>https://realpython.com/</id>
  <author>
    <name>Real Python</name>
  </author>

  
    <entry>
      <title>Primer on Jinja Templating</title>
      <id>https://realpython.com/primer-on-jinja-templating/</id>
      <link href="https://realpython.com/primer-on-jinja-templating/"/>
      <updated>2026-09-13T14:00:00+00:00</updated>
      <summary>With Jinja, you can build rich templates that power the front end of your web applications. But you can use Jinja without a web framework running in the background. Anytime you want to create text files with programmatic content, Jinja can help you out.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Jinja is a powerful template engine commonly used in Python web applications to create dynamic web pages. Jinja also supports standalone usage, enabling you to create &lt;a href=&quot;/ref/glossary/text-file/&quot; class=&quot;ref-link&quot;&gt;text files&lt;/a&gt; with programmatically filled content, making it versatile beyond web frameworks like Flask and Django.&lt;/p&gt;
&lt;p&gt;In this tutorial, you’ll learn how to install Jinja, create and render Jinja templates, and use Jinja’s features such as conditional statements and &lt;a href=&quot;/ref/best-practices/loops/&quot; class=&quot;ref-link&quot;&gt;loops&lt;/a&gt;. You’ll also explore how to use filters and macros to enhance your templates’ functionality, and discover how to nest templates and integrate Jinja seamlessly into a Flask web application.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;By the end of this tutorial, you’ll understand that:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Jinja&lt;/strong&gt; is used to create dynamic web templates and generate text files with programmatic content.&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;templating engine&lt;/strong&gt; processes templates with dynamic content, rendering them as static pages.&lt;/li&gt;
&lt;li&gt;You use &lt;strong&gt;Jinja templates&lt;/strong&gt; in HTML by embedding dynamic placeholders and rendering them with Python.&lt;/li&gt;
&lt;li&gt;You create an &lt;strong&gt;&lt;code&gt;if-else&lt;/code&gt; statement&lt;/strong&gt; in Jinja using &lt;code&gt;{% if condition %} ... {% else %} ... {% endif %}&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;You create a &lt;strong&gt;&lt;code&gt;for&lt;/code&gt; loop&lt;/strong&gt; in Jinja using &lt;code&gt;{% for item in list %} ... {% endfor %}&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Jinja is primarily used in Python but can be integrated with &lt;strong&gt;other languages and frameworks&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You’ll start by using Jinja on its own to cover the basics of Jinja templating.
Later you’ll build a basic Flask web project with two pages and a navigation bar to leverage the full potential of Jinja.&lt;/p&gt;
&lt;p&gt;Throughout the tutorial, you’ll build an example app that showcases some of Jinja’s wide range of features. To see what it’ll do, skip ahead to &lt;a href=&quot;#mark-the-current-page&quot;&gt;the final section&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You can also find the full source code of the web project by clicking on the link below:&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown&gt;Source Code:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/jinja-primer-code/&quot; class=&quot;alert-link&quot; data-bs-toggle=&quot;modal&quot; data-bs-target=&quot;#modal-jinja-primer-code&quot; markdown&gt;Click here to download the source code&lt;/a&gt; that you’ll use to explore Jinja’s capabilities.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;container border rounded text-wrap-pretty my-3&quot;&gt;

  &lt;p class=&quot;my-3&quot;&gt;&lt;mark class=&quot;marker-highlight&quot;&gt;&lt;strong&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.8f1dcd28e216.svg#@quiz&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt; Take the Quiz:&lt;/strong&gt;&lt;/mark&gt; Test your knowledge with our interactive “Primer on Jinja Templating” quiz. You’ll receive a score upon completion to help you track your learning progress:&lt;/p&gt;

  &lt;hr&gt;

  &lt;div class=&quot;row my-3&quot;&gt;
    &lt;div class=&quot;col-12 col-sm-4 col-md-3 align-self-center&quot;&gt;

      &lt;a href=&quot;/quizzes/primer-on-jinja-templating/&quot; tabindex=&quot;-1&quot;&gt;
        &lt;div class=&quot;ratio ratio-16x9&quot;&gt;

            &lt;img class=&quot;card-img-top m-0 p-0 rounded&quot; style=&quot;object-fit: contain; background: #e6c7ab;&quot; alt=&quot;Jinja Templating Engine&quot; src=&quot;https://files.realpython.com/media/Primer-on-Jinja-Templating_Watermarked.ae90a187545f.jpg&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/Primer-on-Jinja-Templating_Watermarked.ae90a187545f.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/Primer-on-Jinja-Templating_Watermarked.ae90a187545f.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/Primer-on-Jinja-Templating_Watermarked.ae90a187545f.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/Primer-on-Jinja-Templating_Watermarked.ae90a187545f.jpg 1920w&quot; sizes=&quot;(min-width: 1200px) 142px, (min-width: 1000px) 122px, (min-width: 780px) 112px, (min-width: 580px) 139px, calc(100vw - 62px)&quot;&gt;


          &lt;div class=&quot;card-img-overlay d-flex align-items-center&quot;&gt;
            &lt;div class=&quot;mx-auto&quot;&gt;
              &lt;span class=&quot;text-light&quot; style=&quot;opacity: 0.90;&quot;&gt;&lt;span class=&quot;icon baseline scale2x&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.8f1dcd28e216.svg#@quiz&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/a&gt;

    &lt;/div&gt;

    &lt;div class=&quot;col position-relative&quot;&gt;
      &lt;div class=&quot;mt-3 d-md-none&quot;&gt;&lt;/div&gt; 
      &lt;p class=&quot;small text-muted mb-0&quot;&gt;&lt;strong&gt;Interactive Quiz&lt;/strong&gt;&lt;/p&gt;
      &lt;a href=&quot;/quizzes/primer-on-jinja-templating/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;Primer on Jinja Templating&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;In this quiz, you&#x27;ll test your understanding of Jinja templating. Jinja is a powerful tool for building rich templates in Python web applications, and it can also be used to create text files with programmatic content.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;

&lt;h2 id=&quot;get-started-with-jinja&quot;&gt;Get Started With Jinja&lt;a class=&quot;headerlink&quot; href=&quot;#get-started-with-jinja&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://jinja.palletsprojects.com/en/stable/&quot;&gt;Jinja&lt;/a&gt; is not only a &lt;a href=&quot;https://en.wikipedia.org/wiki/Jinja,_Uganda&quot;&gt;city in the Eastern Region of Uganda&lt;/a&gt; and a &lt;a href=&quot;https://en.wikipedia.org/wiki/Shinto_shrine&quot;&gt;Japanese temple&lt;/a&gt;, but also a &lt;strong&gt;template engine&lt;/strong&gt;.
You commonly use &lt;a href=&quot;https://en.wikipedia.org/wiki/Template_processor&quot;&gt;template engines&lt;/a&gt; for &lt;strong&gt;web templates&lt;/strong&gt; that receive dynamic content from the &lt;strong&gt;back end&lt;/strong&gt; and render it as a &lt;strong&gt;static page&lt;/strong&gt; in the front end.&lt;/p&gt;
&lt;p&gt;But you can use Jinja without a web framework running in the background.
That’s exactly what you’ll do in this section.
Specifically, you’ll install Jinja and build your first templates.&lt;/p&gt;
&lt;h3 id=&quot;install-jinja&quot;&gt;Install Jinja&lt;a class=&quot;headerlink&quot; href=&quot;#install-jinja&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Before exploring any new &lt;a href=&quot;/ref/glossary/package/&quot; class=&quot;ref-link&quot;&gt;package&lt;/a&gt;, it’s a good idea to create and activate a &lt;a href=&quot;https://realpython.com/python-virtual-environments-a-primer/&quot;&gt;virtual environment&lt;/a&gt;.
That way, you’re installing any project dependencies in your project’s virtual environment instead of system-wide.&lt;/p&gt;
&lt;p&gt;Select your &lt;strong&gt;operating system&lt;/strong&gt; below and use your platform-specific command to set up a virtual environment:&lt;/p&gt;
&lt;ul class=&quot;nav nav-tabs justify-content-end js-platform-widget-tabs&quot; role=&quot;tablist&quot;&gt;

  &lt;li class=&quot;nav-item mb-0 js-platform-widget-tab-windows&quot; role=&quot;presentation&quot;&gt;
    &lt;a class=&quot;nav-link link-unstyled text-body active small&quot; id=&quot;windows-tab-1&quot; data-bs-toggle=&quot;tab&quot; href=&quot;#windows-1&quot; role=&quot;tab&quot; aria-controls=&quot;windows-1&quot; aria-selected=&quot;true&quot;&gt;&lt;span class=&quot;icon baseline text-muted me-1&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.8f1dcd28e216.svg#brands--windows&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;Windows&lt;/a&gt;
  &lt;/li&gt;




  &lt;li class=&quot;nav-item mb-0 js-platform-widget-tab-linuxmacos&quot; role=&quot;presentation&quot;&gt;
    &lt;a class=&quot;nav-link link-unstyled text-body small&quot; id=&quot;macos-tab-1&quot; data-bs-toggle=&quot;tab&quot; href=&quot;#linux-macos-1&quot; role=&quot;tab&quot; aria-controls=&quot;linux-macos-1&quot; aria-selected=&quot;false&quot;&gt;&lt;span class=&quot;icon baseline text-muted&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.8f1dcd28e216.svg#v4--linux&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;span class=&quot;icon baseline text-muted me-1&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.8f1dcd28e216.svg#v4--apple&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;Linux + macOS&lt;/a&gt;
  &lt;/li&gt;

&lt;/ul&gt;
&lt;div class=&quot;tab-content mt-2 mb-0 js-platform-widget-content&quot;&gt;
&lt;div aria-labelledby=&quot;windows-tab-1&quot; class=&quot;tab-pane fade show active&quot; id=&quot;windows-1&quot; role=&quot;tabpanel&quot;&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;pscon&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Language: &lt;/span&gt;Windows PowerShell&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; aria-label=&quot;Toggle prompts and output&quot; role=&quot;button&quot; tabindex=&quot;0&quot;&gt;&lt;span class=&quot;icon baseline js-codeblock-output-on codeblock__header--icon-lower&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.8f1dcd28e216.svg#regular--rectangle-terminal&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;PS&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;python&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;-m&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;venv&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;venv&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;PS&amp;gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.\&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;venv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;\&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Scripts&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;\&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;activate&lt;/span&gt;
&lt;span class=&quot;gp gp-VirtualEnv&quot;&gt;(venv)&lt;/span&gt; &lt;span class=&quot;gp&quot;&gt;PS&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot; aria-label=&quot;Copy to clipboard&quot;&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.8f1dcd28e216.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;/div&gt;
&lt;div aria-labelledby=&quot;linux-macos-tab-1&quot; class=&quot;tab-pane fade &quot; id=&quot;linux-macos-1&quot; role=&quot;tabpanel&quot;&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;console&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Language: &lt;/span&gt;Shell&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; aria-label=&quot;Toggle prompts and output&quot; role=&quot;button&quot; tabindex=&quot;0&quot;&gt;&lt;span class=&quot;icon baseline js-codeblock-output-on codeblock__header--icon-lower&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.8f1dcd28e216.svg#regular--rectangle-terminal&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;python&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;-m&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;venv&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;venv
&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;source&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;venv/bin/activate
&lt;span class=&quot;gp gp-VirtualEnv&quot;&gt;(venv)&lt;/span&gt; &lt;span class=&quot;gp&quot;&gt;$&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot; aria-label=&quot;Copy to clipboard&quot;&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.8f1dcd28e216.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;With the above commands, you create and activate a virtual environment named &lt;code&gt;venv&lt;/code&gt; by using Python’s built-in &lt;code&gt;venv&lt;/code&gt; &lt;a href=&quot;/ref/glossary/module/&quot; class=&quot;ref-link&quot;&gt;module&lt;/a&gt;.
The parentheses (&lt;code&gt;()&lt;/code&gt;) surrounding &lt;code&gt;venv&lt;/code&gt; in front of the prompt indicate that you’ve successfully activated the virtual environment.&lt;/p&gt;
&lt;p&gt;After you’ve created and activated your virtual environment, it’s time to install Jinja with &lt;a href=&quot;https://realpython.com/what-is-pip/&quot;&gt;&lt;code&gt;pip&lt;/code&gt;&lt;/a&gt;:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;console&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Language: &lt;/span&gt;Shell&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; aria-label=&quot;Toggle prompts and output&quot; role=&quot;button&quot; tabindex=&quot;0&quot;&gt;&lt;span class=&quot;icon baseline js-codeblock-output-on codeblock__header--icon-lower&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.8f1dcd28e216.svg#regular--rectangle-terminal&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp gp-VirtualEnv&quot;&gt;(venv)&lt;/span&gt; &lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;python&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;-m&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;pip&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;install&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;Jinja2
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot; aria-label=&quot;Copy to clipboard&quot;&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.8f1dcd28e216.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;p&gt;Don’t forget the &lt;code&gt;2&lt;/code&gt; at the end of the package name.
Otherwise, you’ll install an &lt;a href=&quot;https://pypi.org/project/Jinja/&quot;&gt;old version&lt;/a&gt; that isn’t compatible with Python 3.&lt;/p&gt;
&lt;p&gt;It’s worth noting that although the current major version is actually greater than &lt;code&gt;2&lt;/code&gt;, the package that you’ll install is nevertheless called &lt;code&gt;Jinja2&lt;/code&gt;.
You can verify that you’ve installed a modern version of Jinja by running &lt;code&gt;pip list&lt;/code&gt;:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;console&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Language: &lt;/span&gt;Shell&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; aria-label=&quot;Toggle prompts and output&quot; role=&quot;button&quot; tabindex=&quot;0&quot;&gt;&lt;span class=&quot;icon baseline js-codeblock-output-on codeblock__header--icon-lower&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.8f1dcd28e216.svg#regular--rectangle-terminal&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp gp-VirtualEnv&quot;&gt;(venv)&lt;/span&gt; &lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;python&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;-m&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;pip&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;list
&lt;span class=&quot;go&quot;&gt;Package    Version&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;---------- -------&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;Jinja2     3.x&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;...&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot; aria-label=&quot;Copy to clipboard&quot;&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.8f1dcd28e216.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;p&gt;To make things even more confusing, after installing Jinja with an uppercase &lt;code&gt;J&lt;/code&gt;, you have to import it with a lowercase &lt;code&gt;j&lt;/code&gt; in Python.
Try it out by opening the &lt;a href=&quot;https://realpython.com/interacting-with-python/&quot;&gt;interactive Python interpreter&lt;/a&gt; and running the following commands:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;pycon&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--blue&quot;&gt;
    &lt;span class=&quot;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Language: &lt;/span&gt;Python&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; aria-label=&quot;Toggle prompts and output&quot; role=&quot;button&quot; tabindex=&quot;0&quot;&gt;&lt;span class=&quot;icon baseline js-codeblock-output-on codeblock__header--icon-lower&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.8f1dcd28e216.svg#regular--rectangle-terminal&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nn&quot;&gt;Jinja2&lt;/span&gt;
&lt;span class=&quot;gt&quot;&gt;Traceback (most recent call last):&lt;/span&gt;
&lt;span class=&quot;w&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;c&quot;&gt;...&lt;/span&gt;
&lt;span class=&quot;gr&quot;&gt;ModuleNotFoundError&lt;/span&gt;: &lt;span class=&quot;n&quot;&gt;No module named &#x27;Jinja2&#x27;&lt;/span&gt;

&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nn&quot;&gt;jinja2&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;c1&quot;&gt;# No error&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot; aria-label=&quot;Copy to clipboard&quot;&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.8f1dcd28e216.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/primer-on-jinja-templating/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/primer-on-jinja-templating/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Python Practice Problems: Parsing CSV Files</title>
      <id>https://realpython.com/python-interview-problem-parsing-csv-files/</id>
      <link href="https://realpython.com/python-interview-problem-parsing-csv-files/"/>
      <updated>2026-09-13T14:00:00+00:00</updated>
      <summary>In this tutorial, you&#x27;ll prepare for future interviews by working through a set of Python practice problems that involve CSV files. You&#x27;ll work through the problems yourself and then compare your results with solutions developed by the Real Python team.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Are you a developer looking for some practice with &lt;strong&gt;comma-separated values (CSV) files&lt;/strong&gt; before an upcoming interview? This tutorial will lead you through a series of Python CSV practice problems to help you get ready.&lt;/p&gt;
&lt;p&gt;This tutorial is aimed at intermediate Python developers. It assumes a &lt;a href=&quot;https://realpython.com/products/python-basics-book/&quot;&gt;basic knowledge of Python&lt;/a&gt; and working with &lt;a href=&quot;https://realpython.com/python-csv/&quot;&gt;CSV files&lt;/a&gt;. Like &lt;a href=&quot;https://realpython.com/python-practice-problems/&quot;&gt;other practice problem tutorials&lt;/a&gt;, each of the problems listed here shows the problem description. You’ll see the problem statement first and then have a chance to develop your own solution.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this tutorial, you’ll explore:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Writing code&lt;/strong&gt; for working with CSV files&lt;/li&gt;
&lt;li&gt;Doing &lt;strong&gt;test-driven development&lt;/strong&gt; with &lt;a href=&quot;/ref/tools/pytest/&quot; class=&quot;ref-link&quot;&gt;pytest&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Discussing your solutions&lt;/strong&gt; and possible enhancements&lt;/li&gt;
&lt;li&gt;The trade-offs between the built-in CSV &lt;a href=&quot;/ref/glossary/module/&quot; class=&quot;ref-link&quot;&gt;module&lt;/a&gt; and &lt;strong&gt;pandas&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can get skeleton code with failing unit tests for each of the problems you’ll see in this tutorial by clicking the link below:&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown&gt;Get the Source Code:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/interview-parsing-csv-code/&quot; class=&quot;alert-link&quot; data-bs-toggle=&quot;modal&quot; data-bs-target=&quot;#modal-interview-parsing-csv-code&quot; markdown&gt;Click here to get the source code you’ll use&lt;/a&gt; to practice parsing CSV files in this tutorial.&lt;/p&gt;
&lt;/div&gt;
&lt;h2 id=&quot;python-csv-parsing-football-scores&quot;&gt;Python CSV Parsing: Football Scores&lt;a class=&quot;headerlink&quot; href=&quot;#python-csv-parsing-football-scores&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Your first problem deals with &lt;a href=&quot;https://en.wikipedia.org/wiki/Premier_League&quot;&gt;English Premier League&lt;/a&gt; team standings. You don’t need any special football knowledge to solve this, just Python!&lt;/p&gt;
&lt;p&gt;As you work through the problem, try to write more unit tests for each bit of functionality and &lt;em&gt;then&lt;/em&gt; write the functionality to make the tests pass. This is known as &lt;a href=&quot;https://realpython.com/courses/test-driven-development-pytest/&quot;&gt;test-driven development&lt;/a&gt;, and it can be a great way to show off not only your coding but also your testing chops!&lt;/p&gt;
&lt;h3 id=&quot;problem-description&quot;&gt;Problem Description&lt;a class=&quot;headerlink&quot; href=&quot;#problem-description&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;For this round of the problem, stick to the &lt;a href=&quot;/ref/best-practices/stdlib/&quot; class=&quot;ref-link&quot;&gt;standard library&lt;/a&gt; &lt;code&gt;csv&lt;/code&gt; module. You’ll get another shot at it using &lt;a href=&quot;https://pandas.pydata.org/&quot;&gt;pandas&lt;/a&gt; later. Here’s your first problem:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Find the Minimum Goal Differential&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Write a program that takes a filename on the command line and processes the contents of a CSV file. The contents will be the end-of-season football standings for the English Premier League. Your program should determine which team had the smallest goal differential that season.&lt;/p&gt;
&lt;p&gt;The first line of the CSV file will be column headers, with each subsequent line showing the data for one team:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;csv&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--red&quot;&gt;
    &lt;span class=&quot;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Language: &lt;/span&gt;CSV&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;Team,Games,Wins,Losses,Draws,Goals For,Goals Against
Arsenal,38,26,9,3,79,36
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot; aria-label=&quot;Copy to clipboard&quot;&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.8f1dcd28e216.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;p&gt;The columns labeled &lt;code&gt;Goals For&lt;/code&gt; and &lt;code&gt;Goals Against&lt;/code&gt; contain the total number of goals scored for and against each team in that season. (So Arsenal scored 79 goals and had 36 goals scored against them.)&lt;/p&gt;
&lt;p&gt;Write a program to read the file, then print the name of the team with the smallest difference in &lt;code&gt;Goals For&lt;/code&gt; and &lt;code&gt;Goals Against&lt;/code&gt;. Create unit tests with pytest to test your program.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;There is a single unit test supplied in the skeleton code that tests the problem statement that you’ll see later. You can add more as you write your solution. There are also two &lt;a href=&quot;https://realpython.com/pytest-python-testing/#fixtures-managing-state-and-dependencies&quot;&gt;pytest fixtures&lt;/a&gt; given:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;python&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--blue&quot;&gt;
    &lt;span class=&quot;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Language: &lt;/span&gt;Python&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;c1&quot;&gt;# test_football_v1.py&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nn&quot;&gt;pytest&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nn&quot;&gt;football_v1&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;k&quot;&gt;as&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nn&quot;&gt;fb&lt;/span&gt;

&lt;span class=&quot;nd&quot;&gt;@pytest&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;fixture&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;mock_csv_data&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;():&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;
        &lt;span class=&quot;s2&quot;&gt;&quot;Team,Games,Wins,Losses,Draws,Goals For,Goals Against&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;s2&quot;&gt;&quot;Liverpool FC, 38, 32, 3, 3, 85, 33&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;s2&quot;&gt;&quot;Norwich City FC, 38, 5, 27, 6, 26, 75&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;

&lt;span class=&quot;nd&quot;&gt;@pytest&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;fixture&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;mock_csv_file&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;tmp_path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;mock_csv_data&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;datafile&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;tmp_path&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;football.csv&quot;&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;datafile&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;write_text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;mock_csv_data&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;str&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;datafile&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot; aria-label=&quot;Copy to clipboard&quot;&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.8f1dcd28e216.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python-interview-problem-parsing-csv-files/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-interview-problem-parsing-csv-files/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Quiz: Traditional Face Detection With Python</title>
      <id>https://realpython.com/quizzes/traditional-face-detection-python/</id>
      <link href="https://realpython.com/quizzes/traditional-face-detection-python/"/>
      <updated>2026-09-13T12:00:00+00:00</updated>
      <summary>Test your understanding of face detection with Python. Review Haar-like features, integral images, AdaBoost, and cascading classifiers.</summary>
      <content type="html">
        &lt;p&gt;In this quiz, you&amp;rsquo;ll test your understanding of
&lt;a href=&quot;https://realpython.com/traditional-face-detection-python/&quot;&gt;Traditional Face Detection With Python&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You&amp;rsquo;ll revisit how a computer represents an image, what makes a piece of information
a feature, and how the Viola-Jones algorithm combines Haar-like features, integral
images, AdaBoost, and cascading classifiers into a detector fast enough to run in
real time.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Quiz: Python Debugging With Pdb</title>
      <id>https://realpython.com/quizzes/python-debugging-pdb/</id>
      <link href="https://realpython.com/quizzes/python-debugging-pdb/"/>
      <updated>2026-09-12T12:00:00+00:00</updated>
      <summary>Practice using pdb, Python&#x27;s built-in debugger. Check variables, step through code, set conditional breakpoints, and read a stack trace.</summary>
      <content type="html">
        &lt;p&gt;In this quiz, you&amp;rsquo;ll test your understanding of
&lt;a href=&quot;https://realpython.com/python-debugging-pdb/&quot;&gt;Python Debugging With Pdb&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit how to print variables and expressions at
the &lt;code&gt;(Pdb)&lt;/code&gt; prompt, step through code with &lt;code&gt;n&lt;/code&gt; and &lt;code&gt;s&lt;/code&gt;, set breakpoints that only fire
when a condition holds, watch expressions as they change, and read a stack trace to find
out which function called the one you&amp;rsquo;re paused in.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast – Episode #311: Django Developers Survey Results &amp; Reproducible Python Builds</title>
      <id>https://realpython.com/podcasts/rpp/311/</id>
      <link href="https://realpython.com/podcasts/rpp/311/"/>
      <updated>2026-09-11T12:00:00+00:00</updated>
      <summary>What are the latest trends uncovered in the 2026 Django Developers Survey? How are Django users employing LLMs in their development process? Christopher Trudeau is back on the show this week with another batch of PyCoder&#x27;s Weekly articles and projects.</summary>
      <content type="html">
        &lt;p&gt;What are the latest trends uncovered in the 2026 Django Developers Survey? How are Django users employing LLMs in their development process? Christopher Trudeau is back on the show this week with another batch of PyCoder&#x27;s Weekly articles and projects.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Quiz: The subprocess Module: Wrapping Programs With Python</title>
      <id>https://realpython.com/quizzes/python-subprocess/</id>
      <link href="https://realpython.com/quizzes/python-subprocess/"/>
      <updated>2026-09-11T12:00:00+00:00</updated>
      <summary>Test your understanding of Python&#x27;s subprocess module. Run shell commands, handle exit codes and timeouts, and work with standard streams.</summary>
      <content type="html">
        &lt;p&gt;In this quiz, you&amp;rsquo;ll test your understanding of &lt;a href=&quot;https://realpython.com/python-subprocess/&quot;&gt;The subprocess Module: Wrapping Programs With Python&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit how to launch external programs from Python, read the exit code that a process leaves behind, and raise an exception when a command fails.&lt;/p&gt;
&lt;p&gt;You&amp;rsquo;ll also check whether you can guard against a process that hangs, capture what a program writes to its standard streams, and tell the blocking behavior of &lt;code&gt;run()&lt;/code&gt; apart from the non-blocking behavior of &lt;code&gt;Popen()&lt;/code&gt;.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Quiz: An Effective Python Environment: Making Yourself at Home</title>
      <id>https://realpython.com/quizzes/effective-python-environment/</id>
      <link href="https://realpython.com/quizzes/effective-python-environment/"/>
      <updated>2026-09-10T12:00:00+00:00</updated>
      <summary>Test your understanding of Python environments, including shells, terminals, pyenv, virtual environments, and package managers like pip and poetry.</summary>
      <content type="html">
        &lt;p&gt;In this quiz, you&amp;rsquo;ll test your understanding of &lt;a href=&quot;https://realpython.com/effective-python-environment/&quot;&gt;An Effective Python Environment: Making Yourself at Home&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit the choices that shape your day-to-day Python setup, including shells and terminal emulators, managing multiple Python versions with &lt;code&gt;pyenv&lt;/code&gt;, isolating your projects with virtual environments, and handling dependencies with &lt;code&gt;pip&lt;/code&gt;, &lt;code&gt;pipenv&lt;/code&gt;, and &lt;code&gt;poetry&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;No two developers land on exactly the same setup, so treat this as a chance to check which pieces you already know well and which ones are worth a closer look.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Python 3.15 Preview: Lazy Imports</title>
      <id>https://realpython.com/python315-lazy-imports/</id>
      <link href="https://realpython.com/python315-lazy-imports/"/>
      <updated>2026-09-09T14:00:00+00:00</updated>
      <summary>Learn how Python 3.15 lazy imports work, how deferring heavy modules cuts your app&#x27;s startup time, and which imports still have to stay eager.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Python 3.15 adds lazy imports: a &lt;code&gt;lazy&lt;/code&gt; keyword that puts off loading a module until the first time you use it. The import statement stays where it belongs, at the top of your file, but the work of running it moves to the moment something touches the module’s name. In this tutorial, you’ll make a command-line tool start more than twice as fast without moving a single import.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;By the end of this tutorial, you’ll understand that:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A &lt;strong&gt;lazy import&lt;/strong&gt; binds its name immediately and &lt;strong&gt;loads the module&lt;/strong&gt; the first time something reads that name.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Deferring the imports&lt;/strong&gt; that a code path never touches can &lt;strong&gt;cut startup time&lt;/strong&gt; sharply, and every import still sits at the top of the file.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;lazy&lt;/code&gt; is rejected inside functions, class bodies, and &lt;code&gt;try&lt;/code&gt; blocks&lt;/strong&gt;, so a deferred import can’t slip past an &lt;code&gt;except ImportError&lt;/code&gt; fallback.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;__lazy_modules__&lt;/code&gt; lets one file defer on Python 3.15&lt;/strong&gt; and stay eager on older versions because they ignore it silently instead of refusing to parse it.&lt;/li&gt;
&lt;li&gt;A module that does its work at &lt;strong&gt;import time&lt;/strong&gt;, such as &lt;strong&gt;registering a plugin&lt;/strong&gt;, never runs at all if nothing reads its name.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;First, you’ll install a Python 3.15 pre-release. Then you’ll measure what your imports cost today, see why the old workarounds are unsatisfying, write your first lazy import, and put the keyword to work on a real command-line tool. Along the way, you’ll retire the &lt;code&gt;if TYPE_CHECKING&lt;/code&gt; guard, run into the imports that have to stay eager, and learn how to adopt deferral in a codebase that still has to run on older Pythons.&lt;/p&gt;
&lt;p&gt;To get the most out of this tutorial, you should be comfortable running Python scripts from a terminal. Some familiarity with type hints will help in one section, though you’ll get the background you need as you go.&lt;/p&gt;
&lt;div class=&quot;alert alert-primary&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The examples in this tutorial use Python 3.15.0rc1, so some details may shift slightly before the &lt;a href=&quot;https://peps.python.org/pep-0790/&quot;&gt;final release&lt;/a&gt; on October 1.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;You’ll work through this tutorial with a small command-line tool and a few demo modules. You can download all of them here:&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown&gt;Get Your Code:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/python315-lazy-imports-code/&quot; class=&quot;alert-link&quot; data-bs-toggle=&quot;modal&quot; data-bs-target=&quot;#modal-python315-lazy-imports-code&quot; markdown&gt;Click here to download the free sample code&lt;/a&gt; you’ll use to defer heavy modules and speed up your CLI startup with Python 3.15.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;container border rounded text-wrap-pretty my-3&quot;&gt;

  &lt;p class=&quot;my-3&quot;&gt;&lt;mark class=&quot;marker-highlight&quot;&gt;&lt;strong&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.8f1dcd28e216.svg#@quiz&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt; Take the Quiz:&lt;/strong&gt;&lt;/mark&gt; Test your knowledge with our interactive “Python 3.15 Preview: Lazy Imports” quiz. You’ll receive a score upon completion to help you track your learning progress:&lt;/p&gt;

  &lt;hr&gt;

  &lt;div class=&quot;row my-3&quot;&gt;
    &lt;div class=&quot;col-12 col-sm-4 col-md-3 align-self-center&quot;&gt;

      &lt;a href=&quot;/quizzes/python315-lazy-imports/&quot; tabindex=&quot;-1&quot;&gt;
        &lt;div class=&quot;ratio ratio-16x9&quot;&gt;

            &lt;img class=&quot;card-img-top m-0 p-0 rounded&quot; style=&quot;object-fit: contain; background: #fe7e73;&quot; alt=&quot;A person sliding a drawer labeled POSTPONE into a large machine with a LAZY IMPORT panel, stacks of unlit module cards, a Python logo, and an upward arrow.&quot; src=&quot;https://files.realpython.com/media/Python-3.15-Preview-Explicit-Lazy-Imports_Watermarked.9ef210cc6127.jpg&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/Python-3.15-Preview-Explicit-Lazy-Imports_Watermarked.9ef210cc6127.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/Python-3.15-Preview-Explicit-Lazy-Imports_Watermarked.9ef210cc6127.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/Python-3.15-Preview-Explicit-Lazy-Imports_Watermarked.9ef210cc6127.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/Python-3.15-Preview-Explicit-Lazy-Imports_Watermarked.9ef210cc6127.jpg 1920w&quot; sizes=&quot;(min-width: 1200px) 142px, (min-width: 1000px) 122px, (min-width: 780px) 112px, (min-width: 580px) 139px, calc(100vw - 62px)&quot;&gt;


          &lt;div class=&quot;card-img-overlay d-flex align-items-center&quot;&gt;
            &lt;div class=&quot;mx-auto&quot;&gt;
              &lt;span class=&quot;text-light&quot; style=&quot;opacity: 0.90;&quot;&gt;&lt;span class=&quot;icon baseline scale2x&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.8f1dcd28e216.svg#@quiz&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/a&gt;

    &lt;/div&gt;

    &lt;div class=&quot;col position-relative&quot;&gt;
      &lt;div class=&quot;mt-3 d-md-none&quot;&gt;&lt;/div&gt; 
      &lt;p class=&quot;small text-muted mb-0&quot;&gt;&lt;strong&gt;Interactive Quiz&lt;/strong&gt;&lt;/p&gt;
      &lt;a href=&quot;/quizzes/python315-lazy-imports/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;Python 3.15 Preview: Lazy Imports&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;Test your understanding of Python 3.15 lazy imports, from the lazy keyword and __lazy_modules__ to the imports that have to stay eager.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;

&lt;h2 id=&quot;try-lazy-imports-on-a-python-315-pre-release&quot;&gt;Try Lazy Imports on a Python 3.15 Pre-Release&lt;a class=&quot;headerlink&quot; href=&quot;#try-lazy-imports-on-a-python-315-pre-release&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Python 3.15 won’t reach its final release until October, so you’ll need a pre-release build. The quickest path is &lt;a href=&quot;https://realpython.com/python-uv/&quot;&gt;&lt;code&gt;uv&lt;/code&gt;&lt;/a&gt;, which downloads a prebuilt &lt;a href=&quot;/ref/glossary/interpreter/&quot; class=&quot;ref-link&quot;&gt;interpreter&lt;/a&gt; for your platform. If you don’t have it yet, then Real Python’s guide covers &lt;a href=&quot;https://realpython.com/python-uv/#installing-uv-to-manage-python-projects&quot;&gt;installing &lt;code&gt;uv&lt;/code&gt;&lt;/a&gt; on every platform. Once &lt;code&gt;uv&lt;/code&gt; is in place, you can run the pre-release interpreter straight away:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;console&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Language: &lt;/span&gt;Shell&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; aria-label=&quot;Toggle prompts and output&quot; role=&quot;button&quot; tabindex=&quot;0&quot;&gt;&lt;span class=&quot;icon baseline js-codeblock-output-on codeblock__header--icon-lower&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.8f1dcd28e216.svg#regular--rectangle-terminal&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;uv&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;run&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;--python&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;m&quot;&gt;3&lt;/span&gt;.15&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;python&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;-VV
&lt;span class=&quot;go&quot;&gt;Python 3.15.0rc1 (main, Aug 25 2026, 13:50:37) [Clang 22.1.3 ]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot; aria-label=&quot;Copy to clipboard&quot;&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.8f1dcd28e216.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;p&gt;A single &lt;code&gt;-V&lt;/code&gt; would print just the version number. Doubling it to &lt;code&gt;-VV&lt;/code&gt; adds the build date and the compiler, which is worth having while you’re juggling more than one interpreter and want to be certain which one you landed on.&lt;/p&gt;
&lt;p&gt;Running &lt;a href=&quot;https://realpython.com/intro-to-pyenv/&quot;&gt;&lt;code&gt;pyenv install 3.15.0rc1&lt;/code&gt;&lt;/a&gt; gets you to the same place by a different route. It compiles &lt;a href=&quot;/ref/glossary/cpython/&quot; class=&quot;ref-link&quot;&gt;CPython&lt;/a&gt; from source, so you’ll need a build toolchain first: a C compiler, the Python headers, and a handful of system libraries. That takes longer, but it’s the option to reach for when you want to configure the build yourself.&lt;/p&gt;
&lt;p&gt;You can also &lt;a href=&quot;https://realpython.com/python-versions-docker/&quot;&gt;run a pre-release version of Python in Docker&lt;/a&gt; and keep it off your machine entirely. The &lt;a href=&quot;https://realpython.com/python-pre-release/&quot;&gt;pre-release installation guide&lt;/a&gt; covers all three routes in more detail.&lt;/p&gt;
&lt;p&gt;Next, unpack the sample code you downloaded and change into the folder it creates. That folder is home base for the rest of this tutorial, and every &lt;code&gt;cd&lt;/code&gt; after this one is relative to wherever the last one left you:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;console&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Language: &lt;/span&gt;Shell&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; aria-label=&quot;Toggle prompts and output&quot; role=&quot;button&quot; tabindex=&quot;0&quot;&gt;&lt;span class=&quot;icon baseline js-codeblock-output-on codeblock__header--icon-lower&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.8f1dcd28e216.svg#regular--rectangle-terminal&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;cd&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;materials-python315-lazy-imports/
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot; aria-label=&quot;Copy to clipboard&quot;&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.8f1dcd28e216.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;p&gt;Now create a &lt;a href=&quot;/ref/glossary/virtual-environment/&quot; class=&quot;ref-link&quot;&gt;virtual environment&lt;/a&gt; on the pre-release and activate it, so that a bare &lt;code&gt;python&lt;/code&gt; means 3.15 in every folder you visit. Pinning with &lt;code&gt;uv python pin&lt;/code&gt; doesn’t do that, because the &lt;code&gt;.python-version&lt;/code&gt; file it writes only applies to &lt;code&gt;uv run&lt;/code&gt;:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;console&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Language: &lt;/span&gt;Shell&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; aria-label=&quot;Toggle prompts and output&quot; role=&quot;button&quot; tabindex=&quot;0&quot;&gt;&lt;span class=&quot;icon baseline js-codeblock-output-on codeblock__header--icon-lower&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.8f1dcd28e216.svg#regular--rectangle-terminal&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;uv&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;venv&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;--python&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;m&quot;&gt;3&lt;/span&gt;.15
&lt;span class=&quot;go&quot;&gt;Using CPython 3.15.0rc1&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;Creating virtual environment at: .venv&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;Activate with: source .venv/bin/activate&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot; aria-label=&quot;Copy to clipboard&quot;&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.8f1dcd28e216.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;p&gt;That creates a &lt;code&gt;.venv/&lt;/code&gt; folder inside the sample code folder. Activating it is the step that puts the pre-release on your path:&lt;/p&gt;
&lt;ul class=&quot;nav nav-tabs justify-content-end js-platform-widget-tabs&quot; role=&quot;tablist&quot;&gt;

  &lt;li class=&quot;nav-item mb-0 js-platform-widget-tab-windows&quot; role=&quot;presentation&quot;&gt;
    &lt;a class=&quot;nav-link link-unstyled text-body active small&quot; id=&quot;windows-tab-1&quot; data-bs-toggle=&quot;tab&quot; href=&quot;#windows-1&quot; role=&quot;tab&quot; aria-controls=&quot;windows-1&quot; aria-selected=&quot;true&quot;&gt;&lt;span class=&quot;icon baseline text-muted me-1&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.8f1dcd28e216.svg#brands--windows&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;Windows&lt;/a&gt;
  &lt;/li&gt;




  &lt;li class=&quot;nav-item mb-0 js-platform-widget-tab-linuxmacos&quot; role=&quot;presentation&quot;&gt;
    &lt;a class=&quot;nav-link link-unstyled text-body small&quot; id=&quot;macos-tab-1&quot; data-bs-toggle=&quot;tab&quot; href=&quot;#linux-macos-1&quot; role=&quot;tab&quot; aria-controls=&quot;linux-macos-1&quot; aria-selected=&quot;false&quot;&gt;&lt;span class=&quot;icon baseline text-muted&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.8f1dcd28e216.svg#v4--linux&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;span class=&quot;icon baseline text-muted me-1&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.8f1dcd28e216.svg#v4--apple&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;Linux + macOS&lt;/a&gt;
  &lt;/li&gt;

&lt;/ul&gt;
&lt;div class=&quot;tab-content mt-2 mb-0 js-platform-widget-content&quot;&gt;
&lt;div aria-labelledby=&quot;windows-tab-1&quot; class=&quot;tab-pane fade show active&quot; id=&quot;windows-1&quot; role=&quot;tabpanel&quot;&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;pscon&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Language: &lt;/span&gt;Windows PowerShell&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; aria-label=&quot;Toggle prompts and output&quot; role=&quot;button&quot; tabindex=&quot;0&quot;&gt;&lt;span class=&quot;icon baseline js-codeblock-output-on codeblock__header--icon-lower&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.8f1dcd28e216.svg#regular--rectangle-terminal&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;PS&amp;gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;venv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;\&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Scripts&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;\&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;activate&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot; aria-label=&quot;Copy to clipboard&quot;&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.8f1dcd28e216.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;/div&gt;
&lt;div aria-labelledby=&quot;linux-macos-tab-1&quot; class=&quot;tab-pane fade &quot; id=&quot;linux-macos-1&quot; role=&quot;tabpanel&quot;&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;console&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Language: &lt;/span&gt;Shell&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; aria-label=&quot;Toggle prompts and output&quot; role=&quot;button&quot; tabindex=&quot;0&quot;&gt;&lt;span class=&quot;icon baseline js-codeblock-output-on codeblock__header--icon-lower&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.8f1dcd28e216.svg#regular--rectangle-terminal&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;source&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;.venv/bin/activate
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot; aria-label=&quot;Copy to clipboard&quot;&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.8f1dcd28e216.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;With the environment active, a bare &lt;code&gt;python&lt;/code&gt; is the pre-release build:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;console&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Language: &lt;/span&gt;Shell&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; aria-label=&quot;Toggle prompts and output&quot; role=&quot;button&quot; tabindex=&quot;0&quot;&gt;&lt;span class=&quot;icon baseline js-codeblock-output-on codeblock__header--icon-lower&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.8f1dcd28e216.svg#regular--rectangle-terminal&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;python&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;-VV
&lt;span class=&quot;go&quot;&gt;Python 3.15.0rc1 (main, Aug 25 2026, 13:50:37) [Clang 22.1.3 ]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot; aria-label=&quot;Copy to clipboard&quot;&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.8f1dcd28e216.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;p&gt;That’s the interpreter that every bare &lt;code&gt;python&lt;/code&gt; command from here on will use.&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python315-lazy-imports/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python315-lazy-imports/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>An Effective Python Development Environment</title>
      <id>https://realpython.com/effective-python-environment/</id>
      <link href="https://realpython.com/effective-python-environment/"/>
      <updated>2026-09-09T14:00:00+00:00</updated>
      <summary>Choose a Python development environment that helps you get coding. Find tutorials and courses on editors, uv, virtual environments, and useful tools.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;You want to set up a &lt;strong&gt;Python development environment&lt;/strong&gt; and start coding. But before you’ve written your first &lt;a href=&quot;/ref/computer-science-glossary/script/&quot; class=&quot;ref-link&quot;&gt;script&lt;/a&gt;, you’ve come across discussions about editors, shells, &lt;a href=&quot;/ref/glossary/virtual-environment/&quot; class=&quot;ref-link&quot;&gt;virtual environments&lt;/a&gt;, and half a dozen tools for installing &lt;a href=&quot;/ref/glossary/package/&quot; class=&quot;ref-link&quot;&gt;packages&lt;/a&gt;. How much of this do you need to get started?&lt;/p&gt;
&lt;p&gt;An effective setup gives you a place to write code, a Python &lt;a href=&quot;/ref/glossary/interpreter/&quot; class=&quot;ref-link&quot;&gt;interpreter&lt;/a&gt; to run it, and a way to keep each project’s packages separate. For a new project, &lt;a href=&quot;/ref/code-editors-ides/visual-studio-code/&quot; class=&quot;ref-link&quot;&gt;&lt;strong&gt;VS Code&lt;/strong&gt;&lt;/a&gt; and &lt;a href=&quot;/ref/tools/uv/&quot; class=&quot;ref-link&quot;&gt;&lt;strong&gt;uv&lt;/strong&gt;&lt;/a&gt; are a practical starting point. You can use the terminal that comes with your operating system and add other tools as you discover what helps you work.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this guide, you’ll find resources to help you:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Choose an editor&lt;/strong&gt; and connect it to Python&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Use your terminal&lt;/strong&gt; to run commands&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Manage Python and project dependencies&lt;/strong&gt; with uv&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Explore code interactively&lt;/strong&gt; and get feedback on your work&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Each section gives you enough context to make a choice, then points you toward tutorials and video courses where you can practice. You don’t need to install everything mentioned here. If you already have a setup that works for you, then use this guide to fill in the parts that still feel unfamiliar.&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown&gt;Free Bonus:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/dependency-pitfalls-email-course/&quot; class=&quot;alert-link&quot; data-bs-toggle=&quot;modal&quot; data-bs-target=&quot;#modal-dependency-pitfalls-email-course&quot; markdown&gt;Click here to get access to a free 5-day class&lt;/a&gt; that shows you how to avoid common dependency management issues with tools like Pip, PyPI, Virtualenv, and requirements files.&lt;/p&gt;
&lt;/div&gt;
&lt;h2 id=&quot;choose-your-python-development-environment&quot;&gt;Choose Your Python Development Environment&lt;a class=&quot;headerlink&quot; href=&quot;#choose-your-python-development-environment&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Your development environment should help you work on the project in front of you. A few tools are enough to start, and you can keep using them as your projects grow.&lt;/p&gt;
&lt;p&gt;For a new Python project on your own computer, you can start with these choices:&lt;/p&gt;
&lt;div class=&quot;table-responsive&quot;&gt;
&lt;table class=&quot;table table-hover&quot;&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Part of Your Setup&lt;/th&gt;
&lt;th&gt;Starting Choice&lt;/th&gt;
&lt;th&gt;What It Helps You Do&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Code editor&lt;/td&gt;
&lt;td&gt;VS Code with its Python extension&lt;/td&gt;
&lt;td&gt;Write, run, and debug Python code&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Terminal and shell&lt;/td&gt;
&lt;td&gt;Your operating system’s existing tools&lt;/td&gt;
&lt;td&gt;Navigate folders and run commands&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Python and packages&lt;/td&gt;
&lt;td&gt;uv&lt;/td&gt;
&lt;td&gt;Manage Python versions and each project’s dependencies&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Project folder&lt;/td&gt;
&lt;td&gt;One folder per project&lt;/td&gt;
&lt;td&gt;Keep your code and configuration together&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;These tools work together. You open a project folder in your editor, use uv to manage its Python environment, and run your code with that environment’s interpreter. You’ll learn what each part does in the sections below.&lt;/p&gt;
&lt;p&gt;If you’re following a tutorial or joining an existing project, then start with its setup instructions. A project that uses &lt;a href=&quot;/ref/tools/poetry/&quot; class=&quot;ref-link&quot;&gt;Poetry&lt;/a&gt; or &lt;a href=&quot;/ref/stdlib/venv/&quot; class=&quot;ref-link&quot;&gt;&lt;code&gt;venv&lt;/code&gt;&lt;/a&gt; doesn’t need a different package manager before you can contribute. Matching the project’s workflow gives you fewer differences to troubleshoot while you’re learning.&lt;/p&gt;
&lt;h2 id=&quot;choose-an-editor-and-connect-it-to-python&quot;&gt;Choose an Editor and Connect It to Python&lt;a class=&quot;headerlink&quot; href=&quot;#choose-an-editor-and-connect-it-to-python&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Your &lt;strong&gt;code editor&lt;/strong&gt; is where you’ll spend much of your time reading and writing Python. Syntax highlighting helps you recognize the parts of your code, and a debugger lets you pause a program to inspect what’s happening.&lt;/p&gt;
&lt;p&gt;An editor window can be as uncluttered as this example in VS Code:&lt;/p&gt;
&lt;figure class=&quot;js-lightbox&quot;&gt;&lt;a href=&quot;https://files.realpython.com/media/after.d3e642b0137b.png&quot; target=&quot;_blank&quot;&gt;&lt;img loading=&quot;lazy&quot; class=&quot;img-fluid mx-auto d-block &quot; src=&quot;https://files.realpython.com/media/after.d3e642b0137b.png&quot; width=&quot;1920&quot; height=&quot;1089&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/after.d3e642b0137b.png 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/after.d3e642b0137b.png 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/after.d3e642b0137b.png 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/after.d3e642b0137b.png 1920w&quot; sizes=&quot;(min-width: 1200px) 690px, (min-width: 780px) calc(-5vw + 669px), (min-width: 580px) 510px, calc(100vw - 30px)&quot; alt=&quot;A clean VSCode editor window with a big font size&quot; data-asset=&quot;5192&quot;&gt;&lt;/a&gt;&lt;figcaption class=&quot;figure-caption text-center&quot;&gt;Python Code in a Clean VS Code Editor&lt;/figcaption&gt;&lt;/figure&gt;

&lt;p&gt;The colors and &lt;a href=&quot;/ref/glossary/indentation/&quot; class=&quot;ref-link&quot;&gt;indentation&lt;/a&gt; make the code’s structure easier to see. You don’t need to understand this example’s code to start with a similarly simple workspace.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Visual Studio Code&lt;/strong&gt;, or VS Code, is a useful starting choice for scripts and projects. Install Microsoft’s Python extension, open your project folder, and &lt;a href=&quot;https://code.visualstudio.com/docs/python/environments&quot;&gt;select the Python interpreter&lt;/a&gt; that belongs to that project. For a uv-managed project, that’s typically the interpreter inside its &lt;code&gt;.venv&lt;/code&gt; folder, once uv has created the environment.&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/effective-python-environment/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/effective-python-environment/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Quiz: Starting With Python IDLE</title>
      <id>https://realpython.com/quizzes/starting-python-idle/</id>
      <link href="https://realpython.com/quizzes/starting-python-idle/"/>
      <updated>2026-09-09T12:00:00+00:00</updated>
      <summary>Test your grasp of Python IDLE. Run code in the shell, edit and run files, debug with breakpoints, and make the editor look the way you like.</summary>
      <content type="html">
        &lt;p&gt;In this quiz, you&amp;rsquo;ll test your understanding of
&lt;a href=&quot;https://realpython.com/courses/starting-python-idle/&quot;&gt;Starting With Python IDLE&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit how the IDLE shell works as a REPL,
how to write and run Python files in the editor, how to step through your code with
the built-in debugger, and how to customize the way IDLE looks and behaves.&lt;/p&gt;
&lt;p&gt;IDLE ships with your Python installation, so you already have everything that you
need to practice with.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Quiz: Python 3.15 Preview: Lazy Imports</title>
      <id>https://realpython.com/quizzes/python315-lazy-imports/</id>
      <link href="https://realpython.com/quizzes/python315-lazy-imports/"/>
      <updated>2026-09-09T12:00:00+00:00</updated>
      <summary>Test your understanding of Python 3.15 lazy imports, from the lazy keyword and __lazy_modules__ to the imports that have to stay eager.</summary>
      <content type="html">
        &lt;p&gt;In this quiz, you&amp;rsquo;ll test your understanding of &lt;a href=&quot;https://realpython.com/python315-lazy-imports/&quot;&gt;Python 3.15 Preview: Lazy Imports&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Python 3.15 adds a &lt;code&gt;lazy&lt;/code&gt; keyword that puts off loading a module until the first time you use it. The import statement stays where it belongs, at the top of your file, but the work of running it moves to the moment something touches the module&amp;rsquo;s name.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit how the &lt;code&gt;lazy&lt;/code&gt; keyword defers a module until something reads its name, how much startup time deferring the right imports can save, where Python refuses to accept the keyword, how &lt;code&gt;__lazy_modules__&lt;/code&gt; gets you the same deferral on older Pythons, and which imports have to stay eager.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Python Timer Functions</title>
      <id>https://realpython.com/courses/python-timer-functions/</id>
      <link href="https://realpython.com/courses/python-timer-functions/"/>
      <updated>2026-09-08T14:00:00+00:00</updated>
      <summary>Learn how to time your Python code with the time module, then build a reusable Timer class that works as a context manager.</summary>
      <content type="html">
        &lt;p&gt;A timer is a powerful tool for monitoring the performance of your Python code. By using the &lt;code&gt;time.perf_counter()&lt;/code&gt; function, you can measure execution time with exceptional precision, making it ideal for benchmarking. Using a timer involves recording timestamps before and after a specific code block and calculating the time difference to determine how long your code took to run.&lt;/p&gt;
&lt;p&gt;In this video course, you&amp;rsquo;ll start with the timer functions in Python&amp;rsquo;s &lt;code&gt;time&lt;/code&gt; module and then abstract them into a reusable &lt;code&gt;Timer&lt;/code&gt; class. You&amp;rsquo;ll extend that class to track multiple timers, convert it to a data class for convenience, and finally turn it into a context manager so you can time a block of code using a single &lt;code&gt;with&lt;/code&gt; statement.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;By the end of this course, you&amp;rsquo;ll understand that:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;time.perf_counter()&lt;/code&gt;&lt;/strong&gt; is the best choice for accurate timing in Python due to its high resolution.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;process_time()&lt;/code&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;code&gt;time()&lt;/code&gt;&lt;/strong&gt; measure different things, so picking the wrong one can skew your results.&lt;/li&gt;
&lt;li&gt;You can create a &lt;strong&gt;custom timer class&lt;/strong&gt; to encapsulate timing logic and reuse it across multiple parts of your program.&lt;/li&gt;
&lt;li&gt;Turning your timer into a &lt;strong&gt;data class&lt;/strong&gt; cuts down on boilerplate and makes it easier to configure.&lt;/li&gt;
&lt;li&gt;You can leverage &lt;strong&gt;context managers&lt;/strong&gt; to neatly measure execution time in specific code blocks, improving both resource management and code clarity.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Along the way, you&amp;rsquo;ll gain deeper insights into how &lt;a href=&quot;https://realpython.com/python-classes/&quot;&gt;classes&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python-data-classes/&quot;&gt;data classes&lt;/a&gt;, and &lt;a href=&quot;https://realpython.com/python-with-statement/&quot;&gt;context managers&lt;/a&gt; work in Python.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Quiz: Python Timer Functions</title>
      <id>https://realpython.com/quizzes/python-timer-functions/</id>
      <link href="https://realpython.com/quizzes/python-timer-functions/"/>
      <updated>2026-09-08T12:00:00+00:00</updated>
      <summary>Check what you know about Python timer functions, from picking the right time function to timing a block of code with a context manager.</summary>
      <content type="html">
        &lt;p&gt;In this quiz, you&amp;rsquo;ll test your understanding of
&lt;a href=&quot;https://realpython.com/courses/python-timer-functions/&quot;&gt;Python Timer Functions&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit the timer functions in Python&amp;rsquo;s &lt;code&gt;time&lt;/code&gt; module
and the tradeoffs between them. You&amp;rsquo;ll also review how a timer grows from a plain class
into a data class and then into a context manager that measures a block of code with a
single &lt;code&gt;with&lt;/code&gt; statement.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Async Generators Get yield from and Other Python News for September 2026</title>
      <id>https://realpython.com/python-news-september-2026/</id>
      <link href="https://realpython.com/python-news-september-2026/"/>
      <updated>2026-09-07T14:00:00+00:00</updated>
      <summary>PEP 828 brings yield from to async generators, Python 3.15 freezes its ABI, and four AI libraries ship breaking releases in ten days.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;August was a month for reading release notes rather than writing new code. Python 3.15 stopped accepting changes to its application binary interface, and three older branches got security patches with real CVEs behind them. Four separate AI libraries shipped breaking releases in ten days, and the last of them knocked over a downstream framework, which then took about nine hours to ship a fix.&lt;/p&gt;
&lt;p&gt;If you maintain anything that pins a &lt;a href=&quot;/ref/glossary/dependency/&quot; class=&quot;ref-link&quot;&gt;dependency&lt;/a&gt;, then this was less a month of new toys and more a month of checking what you’re standing on.&lt;/p&gt;
&lt;p&gt;There was one new piece of syntax to look forward to, though, and it closes a gap that has irritated everyone writing &lt;a href=&quot;/ref/glossary/asynchronous-programming/&quot; class=&quot;ref-link&quot;&gt;asynchronous&lt;/a&gt; code for years. On August 3, Yury Selivanov, the Steering Council’s appointed delegate for the PEP, accepted &lt;strong&gt;PEP 828&lt;/strong&gt;.&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown&gt;Join Now:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/newsletter/&quot; class=&quot;alert-link&quot; data-bs-toggle=&quot;modal&quot; data-bs-target=&quot;#modal-newsletter&quot; markdown&gt;Click here to join the Real Python Newsletter&lt;/a&gt; and you’ll never miss another Python tutorial, course, or news update.&lt;/p&gt;
&lt;/div&gt;
&lt;h2 id=&quot;async-generators-finally-get-yield-from&quot;&gt;Async Generators Finally Get &lt;code&gt;yield from&lt;/code&gt;&lt;a class=&quot;headerlink&quot; href=&quot;#async-generators-finally-get-yield-from&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Sync &lt;a href=&quot;/ref/glossary/generator/&quot; class=&quot;ref-link&quot;&gt;generators&lt;/a&gt; have had &lt;a href=&quot;/ref/keywords/yield/&quot; class=&quot;ref-link&quot;&gt;&lt;code&gt;yield from&lt;/code&gt;&lt;/a&gt; since Python 3.3. Async generators never got an equivalent, so delegating to another async generator has always meant writing the loop by hand:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;python&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--blue&quot;&gt;
    &lt;span class=&quot;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Language: &lt;/span&gt;Python&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;async&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;wrapper&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;():&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;async&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;item&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;numbers&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;():&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;yield&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;item&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot; aria-label=&quot;Copy to clipboard&quot;&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.8f1dcd28e216.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;p&gt;That works right up until it doesn’t. The manual loop only forwards values in one direction. If a caller uses &lt;code&gt;.asend()&lt;/code&gt; to push a value back into &lt;code&gt;wrapper()&lt;/code&gt;, or &lt;code&gt;.athrow()&lt;/code&gt; to raise inside it, or &lt;code&gt;.aclose()&lt;/code&gt; to shut it down, then none of that reaches &lt;code&gt;numbers()&lt;/code&gt;. The loop swallows it. Worse, there’s no way to capture what the inner generator returned, because &lt;a href=&quot;/ref/builtin-exceptions/stopasynciteration/&quot; class=&quot;ref-link&quot;&gt;&lt;code&gt;StopAsyncIteration&lt;/code&gt;&lt;/a&gt; has never carried a value.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://peps.python.org/pep-0828/&quot;&gt;PEP 828&lt;/a&gt; fixes both problems by allowing &lt;code&gt;yield from&lt;/code&gt; inside async generators, starting in Python 3.16:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;python&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--blue&quot;&gt;
    &lt;span class=&quot;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Language: &lt;/span&gt;Python&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;async&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;numbers&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;():&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;yield&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;yield&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;done&quot;&lt;/span&gt;


&lt;span class=&quot;k&quot;&gt;async&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;wrapper&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;():&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;result&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;yield from&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;numbers&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot; aria-label=&quot;Copy to clipboard&quot;&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.8f1dcd28e216.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;p&gt;The delegation becomes the interpreter’s job. Values, &lt;a href=&quot;/ref/glossary/exception/&quot; class=&quot;ref-link&quot;&gt;exceptions&lt;/a&gt;, and close requests all propagate through to the inner generator the way they do in sync code, and the PEP adds a &lt;code&gt;.value&lt;/code&gt; attribute to &lt;code&gt;StopAsyncIteration&lt;/code&gt; so the &lt;code&gt;return&lt;/code&gt; statement finally means something.&lt;/p&gt;
&lt;div class=&quot;alert alert-primary&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; If the difference between &lt;code&gt;.asend()&lt;/code&gt; and a plain &lt;code&gt;async for&lt;/code&gt; is new to you, then &lt;a href=&quot;https://realpython.com/async-io-python/&quot;&gt;Python’s asyncio: A Hands-On Walkthrough&lt;/a&gt; and &lt;a href=&quot;https://realpython.com/introduction-to-python-generators/&quot;&gt;How to Use Generators and yield in Python&lt;/a&gt; cover both halves of what PEP 828 is joining together.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;The PEP’s &lt;a href=&quot;https://github.com/python/steering-council/issues/339&quot;&gt;tracking issue&lt;/a&gt; closed on August 7, targeting &lt;strong&gt;Python 3.16&lt;/strong&gt;. That’s a wait, but this is the kind of change that deletes a category of bug rather than adding a feature you have to learn.&lt;/p&gt;
&lt;h2 id=&quot;python-releases-and-pep-highlights&quot;&gt;Python Releases and PEP Highlights&lt;a class=&quot;headerlink&quot; href=&quot;#python-releases-and-pep-highlights&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Three releases, seven new PEP drafts, a rejection, and a withdrawal. The releases matter more than usual this month because two of them close doors rather than open them: one freezes an interface for the rest of the 3.15 series, and the other patches holes that have gone unfixed considerably longer than anyone would like. The PEPs are the opposite, all possibility and no obligation, which makes them the fun part.&lt;/p&gt;
&lt;h3 id=&quot;release-candidate-1-freezes-the-abi&quot;&gt;Release Candidate 1 Freezes the ABI&lt;a class=&quot;headerlink&quot; href=&quot;#release-candidate-1-freezes-the-abi&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.python.org/2026/08/python-3150-rc1&quot;&gt;Python 3.15.0rc1&lt;/a&gt; arrived on August 4, exactly on the schedule &lt;a href=&quot;https://realpython.com/python-news-august-2026/#python-315-ships-its-final-beta&quot;&gt;August’s Python news&lt;/a&gt; laid out. The headline isn’t a feature, because the feature set has been settled &lt;a href=&quot;https://realpython.com/python-news-june-2026/#beta-1-marks-the-315-feature-freeze&quot;&gt;since the freeze back in May&lt;/a&gt;. It’s that the application binary interface, or ABI, is now locked for the entire 3.15 series. From here, only reviewed bug fixes land.&lt;/p&gt;
&lt;p&gt;For most people, that’s trivia. If you ship a &lt;a href=&quot;https://realpython.com/build-python-c-extension-module/&quot;&gt;C extension module&lt;/a&gt;, then it’s the moment your build either works or doesn’t, and you have until October to find out.&lt;/p&gt;
&lt;p&gt;That contract between compiled extensions and the interpreter puts a lot of weight on three letters. If you want it unpacked, then &lt;a href=&quot;https://labs.quansight.org/blog/python-abi-abi3t&quot;&gt;Quansight’s tour of the CPython ABI&lt;/a&gt; remains the clearest walkthrough of what’s being promised, and we covered &lt;a href=&quot;https://realpython.com/python-news-may-2026/#pep-803-accepted-stable-abi-goes-free-threaded&quot;&gt;the free-threaded stable ABI in May’s Python news&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&quot;/ref/glossary/release-candidate/&quot; class=&quot;ref-link&quot;&gt;release candidate&lt;/a&gt; bundles what 3.15 has been assembling all year: &lt;code&gt;frozendict&lt;/code&gt;, &lt;code&gt;sentinel&lt;/code&gt;, explicit lazy imports, &lt;a href=&quot;/ref/computer-science-glossary/utf-8/&quot; class=&quot;ref-link&quot;&gt;UTF-8&lt;/a&gt; by default, unpacking in comprehensions, a &lt;a href=&quot;/ref/glossary/jit-compiler/&quot; class=&quot;ref-link&quot;&gt;JIT&lt;/a&gt; worth roughly 8 to 9 percent on x86-64 Linux, and official macOS installers that now ship the free-threaded build by default.&lt;/p&gt;
&lt;p&gt;Release candidate 2 followed on September 1, and &lt;a href=&quot;https://peps.python.org/pep-0790/&quot;&gt;PEP 790&lt;/a&gt; schedules the final release for October 1. That last date is a target rather than a promise, but the direction is set. If you’ve been meaning to test against 3.15, then the excuse that it’s still changing expired on August 4.&lt;/p&gt;
&lt;h3 id=&quot;three-branches-get-a-security-release&quot;&gt;Three Branches Get a Security Release&lt;a class=&quot;headerlink&quot; href=&quot;#three-branches-get-a-security-release&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;On August 12, Python &lt;a href=&quot;https://blog.python.org/2026/08/python-31214-31116-31021&quot;&gt;3.12.14, 3.11.16, and 3.10.21&lt;/a&gt; shipped together, and this batch has teeth. CVE-2026-4224 covers unbounded &lt;a href=&quot;/ref/glossary/recursion/&quot; class=&quot;ref-link&quot;&gt;recursion&lt;/a&gt; in XML parsing, and CVE-2026-3644 covers control characters slipping into HTTP cookies.&lt;/p&gt;
&lt;p&gt;Alongside those sit a symlink bypass in the &lt;a href=&quot;/ref/stdlib/tarfile/&quot; class=&quot;ref-link&quot;&gt;&lt;code&gt;tarfile&lt;/code&gt;&lt;/a&gt; extraction filter, a Windows-only path bug in &lt;a href=&quot;/ref/stdlib/shutil/&quot; class=&quot;ref-link&quot;&gt;&lt;code&gt;shutil.unpack_archive()&lt;/code&gt;&lt;/a&gt; for ZIP files, buffer issues in &lt;a href=&quot;/ref/stdlib/bz2/&quot; class=&quot;ref-link&quot;&gt;&lt;code&gt;bz2&lt;/code&gt;&lt;/a&gt; and &lt;a href=&quot;/ref/stdlib/lzma/&quot; class=&quot;ref-link&quot;&gt;&lt;code&gt;lzma&lt;/code&gt;&lt;/a&gt;, and an FTP &lt;code&gt;PASV&lt;/code&gt; validation flaw that completes a fix first issued back in 2021.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;tarfile&lt;/code&gt; one is worth pausing on because it’s a hole in the safety net itself, not in the risky path you’d expect. Here’s the call that’s supposed to be safe:&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python-news-september-2026/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-news-september-2026/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Quiz: Python Statistics Fundamentals: How to Describe Your Data</title>
      <id>https://realpython.com/quizzes/python-statistics/</id>
      <link href="https://realpython.com/quizzes/python-statistics/"/>
      <updated>2026-09-07T12:00:00+00:00</updated>
      <summary>Check your understanding of descriptive statistics in Python, from means and spread to correlation, summaries, and plots that reveal your data.</summary>
      <content type="html">
        &lt;p&gt;In this quiz, you&amp;rsquo;ll test your understanding of
&lt;a href=&quot;https://realpython.com/python-statistics/&quot;&gt;Python Statistics Fundamentals: How to Describe Your Data&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through these questions, you&amp;rsquo;ll revisit the numerical quantities that describe and summarize a dataset, including the measures of central tendency, variability, and correlation.&lt;/p&gt;
&lt;p&gt;You&amp;rsquo;ll also revisit how to calculate them with the built-in &lt;code&gt;statistics&lt;/code&gt; module, how NumPy, SciPy, and pandas take over as your data grows, and how plots make those numbers easier to read.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Quiz: Understanding the Python Traceback</title>
      <id>https://realpython.com/quizzes/python-traceback/</id>
      <link href="https://realpython.com/quizzes/python-traceback/"/>
      <updated>2026-09-06T12:00:00+00:00</updated>
      <summary>Check your understanding of Python tracebacks. Practice reading the error message line, recognizing common exceptions, and logging a traceback.</summary>
      <content type="html">
        &lt;p&gt;In this quiz, you&amp;rsquo;ll test your understanding of
&lt;a href=&quot;https://realpython.com/python-traceback/&quot;&gt;Understanding the Python Traceback&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit how to read a traceback from the bottom up,
what each part of the output tells you, how to recognize common exceptions like
&lt;code&gt;AttributeError&lt;/code&gt; and &lt;code&gt;TypeError&lt;/code&gt;, and how to log a traceback while still handling the
exception.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Quiz: Build Your Own Face Recognition Tool With Python</title>
      <id>https://realpython.com/quizzes/face-recognition-with-python/</id>
      <link href="https://realpython.com/quizzes/face-recognition-with-python/"/>
      <updated>2026-09-05T12:00:00+00:00</updated>
      <summary>Check your understanding of face detection, face recognition, face encodings, bounding boxes, and model validation in Python.</summary>
      <content type="html">
        &lt;p&gt;In this quiz, you&amp;rsquo;ll test your understanding of
&lt;a href=&quot;https://realpython.com/face-recognition-with-python/&quot;&gt;Build Your Own Face Recognition Tool With Python&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit how face detection differs from face
recognition, what a face encoding actually holds, how a voting scheme picks the most
likely match, and how validation catches a model that only memorized its training
data. You&amp;rsquo;ll also reorder bounding box coordinates yourself and restrict a
command-line option with
&lt;a href=&quot;https://realpython.com/command-line-interfaces-python-argparse/&quot;&gt;argparse&lt;/a&gt;.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>GPT-6 Astra Draws a Python Reading a Book</title>
      <id>https://realpython.com/ai-benchmark-gpt-6-astra/</id>
      <link href="https://realpython.com/ai-benchmark-gpt-6-astra/"/>
      <updated>2026-09-04T14:00:00+00:00</updated>
      <summary>GPT-6 Astra takes Real Python&#x27;s vibe check for AI models: a turtle drawing of a python reading a book, a Python vintage, a tiny edit, and a made-up function.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;We ran &lt;strong&gt;GPT-6 Astra&lt;/strong&gt; through Real Python’s &lt;a href=&quot;https://realpython.com/ai-benchmark/&quot;&gt;vibe check for new AI models&lt;/a&gt;: five fixed prompts, one shot each. The first one is always the same line, “Write a Python turtle program that draws a python reading a book.” Here’s what GPT-6 Astra drew:&lt;/p&gt;
&lt;figure class=&quot;js-lightbox&quot;&gt;&lt;a href=&quot;https://files.realpython.com/media/turtle.40ca19fb2071.png&quot; target=&quot;_blank&quot;&gt;&lt;img loading=&quot;lazy&quot; class=&quot;img-fluid mx-auto d-block border &quot; src=&quot;https://files.realpython.com/media/turtle.40ca19fb2071.png&quot; width=&quot;784&quot; height=&quot;634&quot; srcset=&quot;/cdn-cgi/image/width=196,format=auto/https://files.realpython.com/media/turtle.40ca19fb2071.png 196w, /cdn-cgi/image/width=261,format=auto/https://files.realpython.com/media/turtle.40ca19fb2071.png 261w, /cdn-cgi/image/width=392,format=auto/https://files.realpython.com/media/turtle.40ca19fb2071.png 392w, /cdn-cgi/image/width=784,format=auto/https://files.realpython.com/media/turtle.40ca19fb2071.png 784w&quot; sizes=&quot;(min-width: 1200px) 690px, (min-width: 780px) calc(-5vw + 669px), (min-width: 580px) 510px, calc(100vw - 30px)&quot; alt=&quot;A python reading a book, drawn with Python&#x27;s turtle module by GPT-6 Astra.&quot; data-asset=&quot;7467&quot;&gt;&lt;/a&gt;&lt;/figure&gt;

&lt;p&gt;That’s task one of five, exactly as its turtle script drew it. The numbers for all five come next, then each task in detail.&lt;/p&gt;
&lt;div class=&quot;card mb-3&quot; id=&quot;collapse_card791e83&quot;&gt;
&lt;div class=&quot;card-header border-0&quot;&gt;
&lt;p class=&quot;m-0&quot;&gt;
    &lt;button class=&quot;btn w-100&quot; data-bs-toggle=&quot;collapse&quot; data-bs-target=&quot;#collapse791e83&quot; aria-expanded=&quot;false&quot; aria-controls=&quot;collapse791e83&quot; markdown&gt;&lt;span class=&quot;float-start&quot; markdown&gt;Watch it draw&lt;/span&gt;&lt;span class=&quot;float-end text-muted&quot;&gt;Show/Hide&lt;/span&gt;&lt;/button&gt;
  &lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;collapse js-collapsible-section&quot; data-bs-parent=&quot;#collapse_card791e83&quot; id=&quot;collapse791e83&quot;&gt;
&lt;div class=&quot;card-body&quot;&gt;
&lt;figure class=&quot;js-lightbox&quot;&gt;&lt;a href=&quot;https://files.realpython.com/media/turtle.8ec4a7ce657d.gif&quot; target=&quot;_blank&quot;&gt;&lt;img loading=&quot;lazy&quot; class=&quot;img-fluid mx-auto d-block border &quot; src=&quot;https://files.realpython.com/media/turtle.8ec4a7ce657d.gif&quot; width=&quot;784&quot; height=&quot;634&quot; srcset=&quot;/cdn-cgi/image/width=196,format=auto/https://files.realpython.com/media/turtle.8ec4a7ce657d.gif 196w, /cdn-cgi/image/width=261,format=auto/https://files.realpython.com/media/turtle.8ec4a7ce657d.gif 261w, /cdn-cgi/image/width=392,format=auto/https://files.realpython.com/media/turtle.8ec4a7ce657d.gif 392w, /cdn-cgi/image/width=784,format=auto/https://files.realpython.com/media/turtle.8ec4a7ce657d.gif 784w&quot; sizes=&quot;(min-width: 1200px) 690px, (min-width: 780px) calc(-5vw + 669px), (min-width: 580px) 510px, calc(100vw - 30px)&quot; alt=&quot;Turtle animation of GPT-6 Astra drawing a python reading a book.&quot; data-asset=&quot;7468&quot;&gt;&lt;/a&gt;&lt;/figure&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;card mb-3&quot; id=&quot;collapse_cardb22243&quot;&gt;
&lt;div class=&quot;card-header border-0&quot;&gt;
&lt;p class=&quot;m-0&quot;&gt;
    &lt;button class=&quot;btn w-100&quot; data-bs-toggle=&quot;collapse&quot; data-bs-target=&quot;#collapseb22243&quot; aria-expanded=&quot;false&quot; aria-controls=&quot;collapseb22243&quot; markdown&gt;&lt;span class=&quot;float-start&quot; markdown&gt;New here? What the five tasks measure&lt;/span&gt;&lt;span class=&quot;float-end text-muted&quot;&gt;Show/Hide&lt;/span&gt;&lt;/button&gt;
  &lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;collapse js-collapsible-section&quot; data-bs-parent=&quot;#collapse_cardb22243&quot; id=&quot;collapseb22243&quot;&gt;
&lt;div class=&quot;card-body&quot;&gt;
&lt;p&gt;Every model gets the same five prompts, one shot each, no system prompt, and nothing is fixed up afterwards. Here is what each row in the results table means:&lt;/p&gt;
&lt;div class=&quot;table-responsive&quot;&gt;
&lt;table class=&quot;table table-hover&quot;&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Task&lt;/th&gt;
&lt;th&gt;What we ask&lt;/th&gt;
&lt;th&gt;What we read off the answer&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;The snake&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Write a &lt;a href=&quot;https://realpython.com/beginners-guide-python-turtle/&quot;&gt;Python turtle&lt;/a&gt; program that draws a python reading a book.&lt;/td&gt;
&lt;td&gt;We run the script under a virtual display and record every drawing command. The picture is whatever came out, arrow and all.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;How modern its Python is&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Write a small command-line tool from a fixed spec.&lt;/td&gt;
&lt;td&gt;Which idioms it reaches for: &lt;code&gt;list[str]&lt;/code&gt; or &lt;code&gt;typing.List&lt;/code&gt;, &lt;code&gt;tomllib&lt;/code&gt; or a hand-rolled parser, &lt;code&gt;Path.walk()&lt;/code&gt; or &lt;code&gt;os.walk()&lt;/code&gt;. Each idiom arrived in a specific Python version, the newest in &lt;a href=&quot;https://realpython.com/python314-new-features/&quot;&gt;Python 3.14&lt;/a&gt;. One old-fashioned idiom pins the model at the version before that idiom existed, so this reading is deliberately strict.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Modern idioms&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;The same CLI tool as above.&lt;/td&gt;
&lt;td&gt;How many of the idioms we check for came out modern, out of those that applied to the model’s code.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Newest Python it knows&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Which Python release is the newest?&lt;/td&gt;
&lt;td&gt;Roughly where the training data ends.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Lines touched for a tiny edit&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Add a &lt;code&gt;--verbose&lt;/code&gt; flag to a 40-line script.&lt;/td&gt;
&lt;td&gt;How many lines changed. The minimal answer changes 7. Much more than that means it rewrote things nobody asked about.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Spots a made-up function?&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;How do I use &lt;code&gt;itertools.flatten()&lt;/code&gt;?&lt;/td&gt;
&lt;td&gt;That function doesn’t exist. &lt;strong&gt;Caught it&lt;/strong&gt; means the model said so. &lt;strong&gt;Sidestepped it&lt;/strong&gt; means it quietly showed a real alternative without mentioning that. &lt;strong&gt;Fell for it&lt;/strong&gt; means it invented an answer.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Reasoning effort&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;The thinking setting we ran with. &lt;strong&gt;default&lt;/strong&gt; means we left the model’s own setting alone, which is how most people use it. The token count is how much thinking the API reported.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Cost&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;What the API charged for all five tasks, in US dollars. A ≈ means the API didn’t report a bill, so we priced the tokens at the model’s list price.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;The overview page calls the second row “Writes Python like it’s“, followed by a year: the release year of the Python version the code reads like.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown&gt;New Model Drops? We Run the Bench:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/ai-benchmark-newsletter/&quot; class=&quot;alert-link&quot; data-bs-toggle=&quot;modal&quot; data-bs-target=&quot;#modal-ai-benchmark-newsletter&quot; markdown&gt;Join the Real Python Newsletter&lt;/a&gt; to get every new AI benchmark run and the full write-ups in your inbox, plus weekly Python tutorials, the moment they land.&lt;/p&gt;
&lt;/div&gt;
&lt;div&gt;


&lt;learning-path-card data-path-id=&quot;coding-with-ai&quot; class=&quot;resource-card border rounded overflow-hidden shadow-sm position-relative mb-4&quot; data-progress-card&gt;

    &lt;a class=&quot;resource-card__media&quot; href=&quot;/learning-paths/coding-with-ai/&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; data-not-previewable&gt;

      &lt;img loading=&quot;lazy&quot; src=&quot;https://files.realpython.com/media/Coding-With-AI-Learning-Path_Watermarked.5c81f9fcda0d.jpg&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/Coding-With-AI-Learning-Path_Watermarked.5c81f9fcda0d.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/Coding-With-AI-Learning-Path_Watermarked.5c81f9fcda0d.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/Coding-With-AI-Learning-Path_Watermarked.5c81f9fcda0d.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/Coding-With-AI-Learning-Path_Watermarked.5c81f9fcda0d.jpg 1920w&quot; alt=&quot;A person standing next to a brain under a dome representing artificial intelligence. The person is relaxed and supervising the AI doing work on the computer.&quot; width=&quot;1920&quot; height=&quot;1080&quot; sizes=&quot;(min-width: 1200px) 172px, (min-width: 1000px) 152px, (min-width: 780px) 142px, (min-width: 580px) 166px, calc(100vw - 32px)&quot; style=&quot;background-color: #fe7e73;&quot;&gt;
    &lt;/a&gt;

  &lt;div class=&quot;resource-card__body&quot;&gt;
    &lt;p class=&quot;small text-muted mb-0&quot;&gt;&lt;strong&gt;Learning Path&lt;/strong&gt;&lt;/p&gt;
    &lt;a class=&quot;stretched-link&quot; href=&quot;/learning-paths/coding-with-ai/&quot;&gt;&lt;h2 class=&quot;my-0 h3&quot;&gt;Python Coding With AI&lt;/h2&gt;&lt;/a&gt;
    &lt;p class=&quot;text-muted mb-0 small&quot;&gt;12 Resources ⋅ &lt;strong&gt;Skills:&lt;/strong&gt; Cursor, Claude Code, AI-Assisted Development&lt;/p&gt;


    &lt;div class=&quot;progress mt-2&quot; data-progress-placeholder&gt;
      &lt;div class=&quot;progress-bar bg-body-tertiary text-body-tertiary small w-100&quot; data-progress-placeholder-bar&gt;&lt;/div&gt;
    &lt;/div&gt;


    &lt;div class=&quot;progress mt-2 d-none&quot; data-progress-container&gt;
      &lt;div class=&quot;progress-bar small&quot; role=&quot;progressbar&quot; data-progress-bar aria-valuenow=&quot;0&quot; aria-valuemin=&quot;0&quot; aria-valuemax=&quot;100&quot; style=&quot;min-width: 2.5em; cursor: default;&quot;&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/learning-path-card&gt;
&lt;/div&gt;

&lt;h2 id=&quot;the-results-at-a-glance&quot;&gt;The Results at a Glance&lt;a class=&quot;headerlink&quot; href=&quot;#the-results-at-a-glance&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The run: &lt;code&gt;openai/gpt-6-astra&lt;/code&gt; via OpenRouter, at its default reasoning settings, with no system prompt and nothing fixed up afterwards. Every task, one row, with the detail behind each number:&lt;/p&gt;
&lt;div class=&quot;table-responsive&quot;&gt;
&lt;table class=&quot;table table-hover&quot;&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Task&lt;/th&gt;
&lt;th&gt;Result&lt;/th&gt;
&lt;th&gt;Detail&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;The snake&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Drew it&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;2264 drawing commands, 196 lines of code&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;How modern its Python is&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Python 3.10&lt;/strong&gt; (2021)&lt;/td&gt;
&lt;td&gt;pinned by &lt;code&gt;file_digest&lt;/code&gt;; newest feature used: Python 3.12&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Modern idioms&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;9 of 15&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;of the checkpoints that applied to its code&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Newest Python it knows&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;3.13.7&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;the reply is quoted below&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Lines touched for a tiny edit&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;11&lt;/strong&gt; (minimal: 7)&lt;/td&gt;
&lt;td&gt;1.6× the minimal patch, 9 lines added and 2 removed&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Spots a made-up function?&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Caught it&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;said the function doesn’t exist and offered a real alternative&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Reasoning effort&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;default&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;1.2k thinking tokens over all five tasks&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cost&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$0.31&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;for all 5 tasks, as billed by the API&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Wall time&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;1 min 25 s&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;6.0k output tokens&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;Each task gets its own section below, with the raw output folded away so you can check the reading.&lt;/p&gt;
&lt;h2 id=&quot;the-five-tasks&quot;&gt;The Five Tasks&lt;a class=&quot;headerlink&quot; href=&quot;#the-five-tasks&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id=&quot;the-snake&quot;&gt;The Snake&lt;a class=&quot;headerlink&quot; href=&quot;#the-snake&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;It ran without errors, issuing 2264 drawing commands from 196 lines of code. The script hides the turtle, turns the tracer off so the picture appears at once, uses 6 absolute &lt;code&gt;goto()&lt;/code&gt; moves and 0 steering calls (&lt;code&gt;forward()&lt;/code&gt;, &lt;code&gt;left()&lt;/code&gt;, &lt;code&gt;circle()&lt;/code&gt;, and friends). If you want to play along, start with our &lt;a href=&quot;https://realpython.com/beginners-guide-python-turtle/&quot;&gt;beginner’s guide to Python turtle&lt;/a&gt;. The prompt is the one line quoted at the top, and it never changes.&lt;/p&gt;
&lt;div class=&quot;card mb-3&quot; id=&quot;collapse_card43d275&quot;&gt;
&lt;div class=&quot;card-header border-0&quot;&gt;
&lt;p class=&quot;m-0&quot;&gt;
    &lt;button class=&quot;btn w-100&quot; data-bs-toggle=&quot;collapse&quot; data-bs-target=&quot;#collapse43d275&quot; aria-expanded=&quot;false&quot; aria-controls=&quot;collapse43d275&quot; markdown&gt;&lt;span class=&quot;float-start&quot; markdown&gt;The turtle script, exactly as the model wrote it&lt;/span&gt;&lt;span class=&quot;float-end text-muted&quot;&gt;Show/Hide&lt;/span&gt;&lt;/button&gt;
  &lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;collapse js-collapsible-section&quot; data-bs-parent=&quot;#collapse_card43d275&quot; id=&quot;collapse43d275&quot;&gt;
&lt;div class=&quot;card-body&quot;&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;python&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--blue&quot;&gt;
    &lt;span class=&quot;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Language: &lt;/span&gt;Python&lt;/span&gt;
    &lt;span class=&quot;me-2&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Filename: &lt;/span&gt;&lt;code style=&quot;color: inherit; background: inherit;&quot;&gt;turtle.py&lt;/code&gt;&lt;/span&gt;
    &lt;div class=&quot;noselect&quot;&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nn&quot;&gt;math&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nn&quot;&gt;turtle&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;screen&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;turtle&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Screen&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;screen&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;setup&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;800&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;650&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;screen&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;A Python Reading Python&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;screen&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;bgcolor&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;#fff6df&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;screen&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;tracer&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;pen&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;turtle&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Turtle&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;pen&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;hideturtle&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;pen&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;speed&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;GREEN&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;#68ad45&quot;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;DARK_GREEN&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;#315e32&quot;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;LIGHT_GREEN&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;#91c85c&quot;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;INK&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;#354253&quot;&lt;/span&gt;


&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;polygon&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;points&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;fill&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;outline&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;INK&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;pen&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;penup&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;pen&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;goto&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;points&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;pen&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;outline&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;fill&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;pen&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pensize&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;pen&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pendown&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;pen&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;begin_fill&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;point&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;points&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:]:&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;pen&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;goto&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;point&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;pen&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;goto&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;points&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;pen&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;end_fill&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;pen&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;penup&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;


&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;ellipse&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;rx&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ry&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;fill&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;outline&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;INK&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;points&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;x&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;rx&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;math&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cos&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;math&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;radians&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;angle&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)),&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;y&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ry&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;math&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sin&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;math&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;radians&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;angle&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)),&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;angle&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;range&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;360&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;polygon&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;points&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;fill&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;outline&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;


&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;line&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;points&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;INK&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;pen&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;penup&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;pen&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;goto&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;points&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;pen&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pencolor&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;pen&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pensize&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;pen&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pendown&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;point&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;points&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:]:&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;pen&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;goto&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;point&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;pen&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;penup&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;


&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;bezier&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;p0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;p1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;p2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;p3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;steps&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;60&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;points&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[]&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;range&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;steps&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;t&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;steps&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;u&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;t&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;points&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;u&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;**&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;p0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;u&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;u&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;t&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;p1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
            &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;u&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;t&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;p2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;**&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;p3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;u&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;**&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;p0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;u&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;u&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;t&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;p1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
            &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;u&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;t&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;p2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;**&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;p3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;points&lt;/span&gt;


&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;words&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;size&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;18&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;INK&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;pen&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;penup&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;pen&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;goto&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;pen&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pencolor&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;pen&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;write&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;words&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;align&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;center&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;font&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Arial&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;size&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;bold&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;


&lt;span class=&quot;c1&quot;&gt;# Ground shadow&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;ellipse&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;190&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;235&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;25&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;#e4d7b5&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;#e4d7b5&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;# Tail curling out from behind the coils&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;tail&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;bezier&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;80&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;160&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;260&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;210&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;265&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;65&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;200&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;105&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;line&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;tail&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;DARK_GREEN&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;28&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;line&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;tail&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;GREEN&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;22&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;# Broad, overlapping coils&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;ellipse&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;15&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;156&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;182&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;46&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;GREEN&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;DARK_GREEN&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;ellipse&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;15&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;132&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;154&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;39&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;LIGHT_GREEN&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;DARK_GREEN&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;ellipse&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;15&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;112&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;125&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;31&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;GREEN&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;DARK_GREEN&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;# Raised neck, behind the book&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;neck&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;bezier&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;105&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;117&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;215&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;85&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;174&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;39&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;112&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;56&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;bezier&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;112&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;56&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;83&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;66&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;70&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;74&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;51&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;90&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:]&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;line&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;neck&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;DARK_GREEN&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;66&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;line&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;neck&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;GREEN&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;58&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;# A few python markings&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;rx&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ry&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;150&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;69&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;12&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;17&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;158&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;29&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;12&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;16&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;143&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;14&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;11&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;107&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;39&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;13&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;9&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;94&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;163&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;17&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;42&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;178&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;17&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;29&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;179&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;17&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;100&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;167&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;17&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;]:&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;ellipse&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;rx&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ry&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;#4c873b&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;#4c873b&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;# Head&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;ellipse&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;15&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;96&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;82&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;55&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;LIGHT_GREEN&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;DARK_GREEN&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;ellipse&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;15&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;73&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;56&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;24&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;#b7db7a&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;#b7db7a&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;# Eyes&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;16&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;43&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;ellipse&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;108&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;22&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;23&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;white&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;DARK_GREEN&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;# Pupils look down toward the book.&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;ellipse&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;100&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;INK&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;INK&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;ellipse&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;104&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;white&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;white&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;# Round reading glasses&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;16&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;43&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;rim&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;x&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;27&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;math&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cos&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;math&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;radians&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)),&lt;/span&gt;
            &lt;span class=&quot;mi&quot;&gt;108&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;27&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;math&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sin&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;math&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;radians&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)),&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;range&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;361&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;line&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;rim&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;#664735&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;line&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;([(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;11&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;110&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;16&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;112&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)],&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;#664735&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;line&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;([(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;43&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;114&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;60&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;125&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)],&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;#664735&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;line&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;([(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;70&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;114&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;88&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;124&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)],&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;#664735&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;# Nostrils and a contented smile&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;ellipse&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;77&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;DARK_GREEN&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;DARK_GREEN&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;ellipse&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;27&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;77&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;DARK_GREEN&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;DARK_GREEN&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;line&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;bezier&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;12&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;66&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;54&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;25&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;54&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;41&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;67&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)),&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;DARK_GREEN&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;# Open book: blue covers&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;polygon&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;[(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;168&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;12&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;14&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;27&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
     &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;14&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;168&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;12&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;168&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;123&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
     &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;156&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;168&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;123&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)],&lt;/span&gt;
    &lt;span class=&quot;s2&quot;&gt;&quot;#396f9d&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;s2&quot;&gt;&quot;#244664&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;# Left and right pages&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;polygon&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;[(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;156&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;24&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;24&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;6&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;14&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
     &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;143&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;24&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;127&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;156&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;110&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)],&lt;/span&gt;
    &lt;span class=&quot;s2&quot;&gt;&quot;#fffdf3&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;s2&quot;&gt;&quot;#b6aa8a&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;polygon&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;[(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;14&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;24&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;6&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;156&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;24&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
     &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;156&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;110&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;24&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;127&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;143&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)],&lt;/span&gt;
    &lt;span class=&quot;s2&quot;&gt;&quot;#fff8e3&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;s2&quot;&gt;&quot;#b6aa8a&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;# Spine&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;line&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;([(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;15&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;142&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)],&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;#a99a7c&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;# Page headings&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;80&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;20&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;PYTHON&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;17&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;80&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;20&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;CHAPTER 1&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;12&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;# Printed lines follow the angle of each page.&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;39&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;55&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;71&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;87&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;line&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;([(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;135&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;25&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)],&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;#a7aaa5&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;line&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;([(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;25&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;135&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)],&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;#a7aaa5&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;# Ribbon bookmark&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;polygon&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;[(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;15&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;130&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;29&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;127&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;29&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;173&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
     &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;22&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;164&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;15&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;177&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)],&lt;/span&gt;
    &lt;span class=&quot;s2&quot;&gt;&quot;#df6558&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;s2&quot;&gt;&quot;#b94940&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;231&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;A little light reading...&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;24&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;DARK_GREEN&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;246&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;Even pythons study Python!&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;17&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;DARK_GREEN&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;screen&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;update&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;screen&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;exitonclick&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot; aria-label=&quot;Copy to clipboard&quot;&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.8f1dcd28e216.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&quot;the-stash-tool&quot;&gt;The Stash Tool&lt;a class=&quot;headerlink&quot; href=&quot;#the-stash-tool&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/ai-benchmark-gpt-6-astra/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/ai-benchmark-gpt-6-astra/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast – Episode #310: Performance Engineering: Profiling and Making Apps Fast by Default</title>
      <id>https://realpython.com/podcasts/rpp/310/</id>
      <link href="https://realpython.com/podcasts/rpp/310/"/>
      <updated>2026-09-04T12:00:00+00:00</updated>
      <summary>How do you plan for the performance of your Python applications? What does a performance budget entail, and where should you spend your resources? This week on the show, we speak with Den Odell about his new book &quot;Fast by Default: Practical Performance Engineering.&quot;</summary>
      <content type="html">
        &lt;p&gt;How do you plan for the performance of your Python applications? What does a performance budget entail, and where should you spend your resources? This week on the show, we speak with Den Odell about his new book &quot;Fast by Default: Practical Performance Engineering.&quot;&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Claude Fable 5.1 Draws a Python Reading a Book</title>
      <id>https://realpython.com/ai-benchmark-claude-fable-5-1/</id>
      <link href="https://realpython.com/ai-benchmark-claude-fable-5-1/"/>
      <updated>2026-09-03T14:00:00+00:00</updated>
      <summary>Claude Fable 5.1 takes Real Python&#x27;s vibe check for AI models: a turtle drawing of a python reading a book, a Python vintage, a tiny edit, and a made-up function.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;We ran &lt;strong&gt;Claude Fable 5.1&lt;/strong&gt; through Real Python’s &lt;a href=&quot;https://realpython.com/ai-benchmark/&quot;&gt;vibe check for new AI models&lt;/a&gt;: five fixed prompts, one shot each. The first one is always the same line, “Write a Python turtle program that draws a python reading a book.” Here’s what Claude Fable 5.1 drew:&lt;/p&gt;
&lt;figure class=&quot;js-lightbox&quot;&gt;&lt;a href=&quot;https://files.realpython.com/media/turtle.2f6a98f4c61a.png&quot; target=&quot;_blank&quot;&gt;&lt;img loading=&quot;lazy&quot; class=&quot;img-fluid mx-auto d-block border &quot; src=&quot;https://files.realpython.com/media/turtle.2f6a98f4c61a.png&quot; width=&quot;784&quot; height=&quot;584&quot; srcset=&quot;/cdn-cgi/image/width=196,format=auto/https://files.realpython.com/media/turtle.2f6a98f4c61a.png 196w, /cdn-cgi/image/width=261,format=auto/https://files.realpython.com/media/turtle.2f6a98f4c61a.png 261w, /cdn-cgi/image/width=392,format=auto/https://files.realpython.com/media/turtle.2f6a98f4c61a.png 392w, /cdn-cgi/image/width=784,format=auto/https://files.realpython.com/media/turtle.2f6a98f4c61a.png 784w&quot; sizes=&quot;(min-width: 1200px) 690px, (min-width: 780px) calc(-5vw + 669px), (min-width: 580px) 510px, calc(100vw - 30px)&quot; alt=&quot;A python reading a book, drawn with Python&#x27;s turtle module by Claude Fable 5.1.&quot; data-asset=&quot;7456&quot;&gt;&lt;/a&gt;&lt;/figure&gt;

&lt;p&gt;That’s task one of five, exactly as its turtle script drew it. The numbers for all five come next, then each task in detail.&lt;/p&gt;
&lt;div class=&quot;card mb-3&quot; id=&quot;collapse_cardbdcfc0&quot;&gt;
&lt;div class=&quot;card-header border-0&quot;&gt;
&lt;p class=&quot;m-0&quot;&gt;
    &lt;button class=&quot;btn w-100&quot; data-bs-toggle=&quot;collapse&quot; data-bs-target=&quot;#collapsebdcfc0&quot; aria-expanded=&quot;false&quot; aria-controls=&quot;collapsebdcfc0&quot; markdown&gt;&lt;span class=&quot;float-start&quot; markdown&gt;Watch it draw&lt;/span&gt;&lt;span class=&quot;float-end text-muted&quot;&gt;Show/Hide&lt;/span&gt;&lt;/button&gt;
  &lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;collapse js-collapsible-section&quot; data-bs-parent=&quot;#collapse_cardbdcfc0&quot; id=&quot;collapsebdcfc0&quot;&gt;
&lt;div class=&quot;card-body&quot;&gt;
&lt;figure class=&quot;js-lightbox&quot;&gt;&lt;a href=&quot;https://files.realpython.com/media/turtle.22cef87ed6df.gif&quot; target=&quot;_blank&quot;&gt;&lt;img loading=&quot;lazy&quot; class=&quot;img-fluid mx-auto d-block border &quot; src=&quot;https://files.realpython.com/media/turtle.22cef87ed6df.gif&quot; width=&quot;784&quot; height=&quot;584&quot; srcset=&quot;/cdn-cgi/image/width=196,format=auto/https://files.realpython.com/media/turtle.22cef87ed6df.gif 196w, /cdn-cgi/image/width=261,format=auto/https://files.realpython.com/media/turtle.22cef87ed6df.gif 261w, /cdn-cgi/image/width=392,format=auto/https://files.realpython.com/media/turtle.22cef87ed6df.gif 392w, /cdn-cgi/image/width=784,format=auto/https://files.realpython.com/media/turtle.22cef87ed6df.gif 784w&quot; sizes=&quot;(min-width: 1200px) 690px, (min-width: 780px) calc(-5vw + 669px), (min-width: 580px) 510px, calc(100vw - 30px)&quot; alt=&quot;Turtle animation of Claude Fable 5.1 drawing a python reading a book.&quot; data-asset=&quot;7457&quot;&gt;&lt;/a&gt;&lt;/figure&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;card mb-3&quot; id=&quot;collapse_carde0c1da&quot;&gt;
&lt;div class=&quot;card-header border-0&quot;&gt;
&lt;p class=&quot;m-0&quot;&gt;
    &lt;button class=&quot;btn w-100&quot; data-bs-toggle=&quot;collapse&quot; data-bs-target=&quot;#collapsee0c1da&quot; aria-expanded=&quot;false&quot; aria-controls=&quot;collapsee0c1da&quot; markdown&gt;&lt;span class=&quot;float-start&quot; markdown&gt;New here? What the five tasks measure&lt;/span&gt;&lt;span class=&quot;float-end text-muted&quot;&gt;Show/Hide&lt;/span&gt;&lt;/button&gt;
  &lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;collapse js-collapsible-section&quot; data-bs-parent=&quot;#collapse_carde0c1da&quot; id=&quot;collapsee0c1da&quot;&gt;
&lt;div class=&quot;card-body&quot;&gt;
&lt;p&gt;Every model gets the same five prompts, one shot each, no system prompt, and nothing is fixed up afterwards. Here is what each row in the results table means:&lt;/p&gt;
&lt;div class=&quot;table-responsive&quot;&gt;
&lt;table class=&quot;table table-hover&quot;&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Task&lt;/th&gt;
&lt;th&gt;What we ask&lt;/th&gt;
&lt;th&gt;What we read off the answer&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;The snake&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Write a &lt;a href=&quot;https://realpython.com/beginners-guide-python-turtle/&quot;&gt;Python turtle&lt;/a&gt; program that draws a python reading a book.&lt;/td&gt;
&lt;td&gt;We run the script under a virtual display and record every drawing command. The picture is whatever came out, arrow and all.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;How modern its Python is&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Write a small command-line tool from a fixed spec.&lt;/td&gt;
&lt;td&gt;Which idioms it reaches for: &lt;code&gt;list[str]&lt;/code&gt; or &lt;code&gt;typing.List&lt;/code&gt;, &lt;code&gt;tomllib&lt;/code&gt; or a hand-rolled parser, &lt;code&gt;Path.walk()&lt;/code&gt; or &lt;code&gt;os.walk()&lt;/code&gt;. Each idiom arrived in a specific Python version, the newest in &lt;a href=&quot;https://realpython.com/python314-new-features/&quot;&gt;Python 3.14&lt;/a&gt;. One old-fashioned idiom pins the model at the version before that idiom existed, so this reading is deliberately strict.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Modern idioms&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;The same CLI tool as above.&lt;/td&gt;
&lt;td&gt;How many of the idioms we check for came out modern, out of those that applied to the model’s code.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Newest Python it knows&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Which Python release is the newest?&lt;/td&gt;
&lt;td&gt;Roughly where the training data ends.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Lines touched for a tiny edit&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Add a &lt;code&gt;--verbose&lt;/code&gt; flag to a 40-line script.&lt;/td&gt;
&lt;td&gt;How many lines changed. The minimal answer changes 7. Much more than that means it rewrote things nobody asked about.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Spots a made-up function?&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;How do I use &lt;code&gt;itertools.flatten()&lt;/code&gt;?&lt;/td&gt;
&lt;td&gt;That function doesn’t exist. &lt;strong&gt;Caught it&lt;/strong&gt; means the model said so. &lt;strong&gt;Sidestepped it&lt;/strong&gt; means it quietly showed a real alternative without mentioning that. &lt;strong&gt;Fell for it&lt;/strong&gt; means it invented an answer.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Reasoning effort&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;The thinking setting we ran with. &lt;strong&gt;default&lt;/strong&gt; means we left the model’s own setting alone, which is how most people use it. The token count is how much thinking the API reported.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Cost&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;What the API charged for all five tasks, in US dollars. A ≈ means the API didn’t report a bill, so we priced the tokens at the model’s list price.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;The overview page calls the second row “Writes Python like it’s“, followed by a year: the release year of the Python version the code reads like.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown&gt;New Model Drops? We Run the Bench:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/ai-benchmark-newsletter/&quot; class=&quot;alert-link&quot; data-bs-toggle=&quot;modal&quot; data-bs-target=&quot;#modal-ai-benchmark-newsletter&quot; markdown&gt;Join the Real Python Newsletter&lt;/a&gt; to get every new AI benchmark run and the full write-ups in your inbox, plus weekly Python tutorials, the moment they land.&lt;/p&gt;
&lt;/div&gt;
&lt;div&gt;


&lt;learning-path-card data-path-id=&quot;coding-with-ai&quot; class=&quot;resource-card border rounded overflow-hidden shadow-sm position-relative mb-4&quot; data-progress-card&gt;

    &lt;a class=&quot;resource-card__media&quot; href=&quot;/learning-paths/coding-with-ai/&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; data-not-previewable&gt;

      &lt;img loading=&quot;lazy&quot; src=&quot;https://files.realpython.com/media/Coding-With-AI-Learning-Path_Watermarked.5c81f9fcda0d.jpg&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/Coding-With-AI-Learning-Path_Watermarked.5c81f9fcda0d.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/Coding-With-AI-Learning-Path_Watermarked.5c81f9fcda0d.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/Coding-With-AI-Learning-Path_Watermarked.5c81f9fcda0d.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/Coding-With-AI-Learning-Path_Watermarked.5c81f9fcda0d.jpg 1920w&quot; alt=&quot;A person standing next to a brain under a dome representing artificial intelligence. The person is relaxed and supervising the AI doing work on the computer.&quot; width=&quot;1920&quot; height=&quot;1080&quot; sizes=&quot;(min-width: 1200px) 172px, (min-width: 1000px) 152px, (min-width: 780px) 142px, (min-width: 580px) 166px, calc(100vw - 32px)&quot; style=&quot;background-color: #fe7e73;&quot;&gt;
    &lt;/a&gt;

  &lt;div class=&quot;resource-card__body&quot;&gt;
    &lt;p class=&quot;small text-muted mb-0&quot;&gt;&lt;strong&gt;Learning Path&lt;/strong&gt;&lt;/p&gt;
    &lt;a class=&quot;stretched-link&quot; href=&quot;/learning-paths/coding-with-ai/&quot;&gt;&lt;h2 class=&quot;my-0 h3&quot;&gt;Python Coding With AI&lt;/h2&gt;&lt;/a&gt;
    &lt;p class=&quot;text-muted mb-0 small&quot;&gt;12 Resources ⋅ &lt;strong&gt;Skills:&lt;/strong&gt; Cursor, Claude Code, AI-Assisted Development&lt;/p&gt;


    &lt;div class=&quot;progress mt-2&quot; data-progress-placeholder&gt;
      &lt;div class=&quot;progress-bar bg-body-tertiary text-body-tertiary small w-100&quot; data-progress-placeholder-bar&gt;&lt;/div&gt;
    &lt;/div&gt;


    &lt;div class=&quot;progress mt-2 d-none&quot; data-progress-container&gt;
      &lt;div class=&quot;progress-bar small&quot; role=&quot;progressbar&quot; data-progress-bar aria-valuenow=&quot;0&quot; aria-valuemin=&quot;0&quot; aria-valuemax=&quot;100&quot; style=&quot;min-width: 2.5em; cursor: default;&quot;&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/learning-path-card&gt;
&lt;/div&gt;

&lt;h2 id=&quot;the-results-at-a-glance&quot;&gt;The Results at a Glance&lt;a class=&quot;headerlink&quot; href=&quot;#the-results-at-a-glance&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The run: &lt;code&gt;anthropic/claude-fable-5.1&lt;/code&gt; via OpenRouter, at its default reasoning settings, with no system prompt and nothing fixed up afterwards. Every task, one row, with the detail behind each number:&lt;/p&gt;
&lt;div class=&quot;table-responsive&quot;&gt;
&lt;table class=&quot;table table-hover&quot;&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Task&lt;/th&gt;
&lt;th&gt;Result&lt;/th&gt;
&lt;th&gt;Detail&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;The snake&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Drew it&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;772 drawing commands, 208 lines of code&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;How modern its Python is&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Python 3.12&lt;/strong&gt; (2023)&lt;/td&gt;
&lt;td&gt;pinned by &lt;code&gt;path_copy&lt;/code&gt;; newest feature used: Python 3.12&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Modern idioms&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;12 of 15&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;of the checkpoints that applied to its code&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Newest Python it knows&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;3.14&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;the reply is quoted below&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Lines touched for a tiny edit&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;13&lt;/strong&gt; (minimal: 7)&lt;/td&gt;
&lt;td&gt;1.9× the minimal patch, 11 lines added and 2 removed&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Spots a made-up function?&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Caught it&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;said the function doesn’t exist and offered a real alternative&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Reasoning effort&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;default&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;9.4k thinking tokens over all five tasks&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cost&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$0.89&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;for all 5 tasks, as billed by the API&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Wall time&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;3 min 36 s&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;17.5k output tokens&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/ai-benchmark-claude-fable-5-1/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/ai-benchmark-claude-fable-5-1/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Python 3.15 Preview: UTF-8 by Default</title>
      <id>https://realpython.com/python315-utf8-default/</id>
      <link href="https://realpython.com/python315-utf8-default/"/>
      <updated>2026-09-02T14:00:00+00:00</updated>
      <summary>Preview the Python 3.15 UTF-8 default: see what changes, try it on a pre-release, and keep your file I/O portable across every platform.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Python 3.15 makes UTF-8 the default text encoding. A plain &lt;code&gt;open(&quot;notes.txt&quot;)&lt;/code&gt; call now decodes the same way on every platform, including Windows. Earlier Python versions picked an encoding from your locale, so on Windows the same code that worked on Linux and macOS could produce garbage.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;By the end of this tutorial, you’ll understand that:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Python 3.15&lt;/strong&gt; enables &lt;strong&gt;UTF-8&lt;/strong&gt; as its default text encoding, so text I/O uses it when you omit the &lt;code&gt;encoding&lt;/code&gt; argument.&lt;/li&gt;
&lt;li&gt;The previous encoding default came from your &lt;strong&gt;locale&lt;/strong&gt;, which often meant &lt;code&gt;cp1252&lt;/code&gt; on Windows and &lt;code&gt;utf-8&lt;/code&gt; on Linux and macOS.&lt;/li&gt;
&lt;li&gt;Passing &lt;code&gt;encoding=&quot;utf-8&quot;&lt;/code&gt; keeps your file I/O &lt;strong&gt;portable&lt;/strong&gt; and safe across every Python version and platform.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;flake8-encodings&lt;/code&gt; tool and the &lt;code&gt;-X warn_default_encoding&lt;/code&gt; flag help you find code that leans on the &lt;strong&gt;implicit&lt;/strong&gt; default.&lt;/li&gt;
&lt;li&gt;Setting &lt;code&gt;PYTHONUTF8=0&lt;/code&gt; or passing &lt;code&gt;encoding=&quot;locale&quot;&lt;/code&gt; restores the &lt;strong&gt;locale-based&lt;/strong&gt; behavior when you need it.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Here’s what the change looks like. Say that you save the text &lt;code&gt;&quot;Café ☕&quot;&lt;/code&gt; to a file and read it back with a bare call to &lt;a href=&quot;/ref/builtin-functions/open/&quot; class=&quot;ref-link&quot;&gt;&lt;code&gt;open()&lt;/code&gt;&lt;/a&gt; on Windows:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;pscon&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Language: &lt;/span&gt;Windows PowerShell&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; aria-label=&quot;Toggle prompts and output&quot; role=&quot;button&quot; tabindex=&quot;0&quot;&gt;&lt;span class=&quot;icon baseline js-codeblock-output-on codeblock__header--icon-lower&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.8f1dcd28e216.svg#regular--rectangle-terminal&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;PS&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;py&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;14&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;-c&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;print(open(&#x27;cafe.txt&#x27;).read())&quot;&lt;/span&gt;
&lt;span class=&quot;hll&quot;&gt;&lt;span class=&quot;go&quot;&gt;CafÃ© â˜•&lt;/span&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot; aria-label=&quot;Copy to clipboard&quot;&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.8f1dcd28e216.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;p&gt;In this example, the default decoder—often &lt;code&gt;cp1252&lt;/code&gt;—misinterprets the UTF-8 bytes, so the code prints &lt;a href=&quot;https://en.wikipedia.org/wiki/Mojibake&quot;&gt;mojibake&lt;/a&gt;. Now look at how the same code behaves on Python 3.15:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;pscon&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Language: &lt;/span&gt;Windows PowerShell&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; aria-label=&quot;Toggle prompts and output&quot; role=&quot;button&quot; tabindex=&quot;0&quot;&gt;&lt;span class=&quot;icon baseline js-codeblock-output-on codeblock__header--icon-lower&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.8f1dcd28e216.svg#regular--rectangle-terminal&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;PS&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;py&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;15&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;-c&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;print(open(&#x27;cafe.txt&#x27;).read())&quot;&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;Café ☕&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot; aria-label=&quot;Copy to clipboard&quot;&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.8f1dcd28e216.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;p&gt;Same code, no &lt;code&gt;encoding&lt;/code&gt; argument to &lt;code&gt;open()&lt;/code&gt;, and the mojibake is gone because of the consistent UTF-8 default. In this tutorial, you’ll first see exactly what changes, then try the new default on a Python 3.15 pre-release. After that, you’ll learn how to keep your own code working the same way on every Python version and platform.&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown&gt;Get Your Code:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/python315-utf8-default-code/&quot; class=&quot;alert-link&quot; data-bs-toggle=&quot;modal&quot; data-bs-target=&quot;#modal-python315-utf8-default-code&quot; markdown&gt;Click here to download the free sample code&lt;/a&gt; you’ll use to find implicit-encoding calls and keep your file I/O portable across every platform.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;container border rounded text-wrap-pretty my-3&quot;&gt;

  &lt;p class=&quot;my-3&quot;&gt;&lt;mark class=&quot;marker-highlight&quot;&gt;&lt;strong&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.8f1dcd28e216.svg#@quiz&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt; Take the Quiz:&lt;/strong&gt;&lt;/mark&gt; Test your knowledge with our interactive “Python 3.15 Preview: UTF-8 by Default” quiz. You’ll receive a score upon completion to help you track your learning progress:&lt;/p&gt;

  &lt;hr&gt;

  &lt;div class=&quot;row my-3&quot;&gt;
    &lt;div class=&quot;col-12 col-sm-4 col-md-3 align-self-center&quot;&gt;

      &lt;a href=&quot;/quizzes/python315-utf8-default/&quot; tabindex=&quot;-1&quot;&gt;
        &lt;div class=&quot;ratio ratio-16x9&quot;&gt;

            &lt;img class=&quot;card-img-top m-0 p-0 rounded&quot; style=&quot;object-fit: contain; background: #b9abe6;&quot; alt=&quot;A person places the third of three identical Café cards onto a numbered rack beside a machine with gauges, a Python logo, and panels labeled UTF-8 and SAFE.&quot; src=&quot;https://files.realpython.com/media/Python-3.15-Preview-UTF-8-by-Default_Watermarked.5bc9458d892f.jpg&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/Python-3.15-Preview-UTF-8-by-Default_Watermarked.5bc9458d892f.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/Python-3.15-Preview-UTF-8-by-Default_Watermarked.5bc9458d892f.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/Python-3.15-Preview-UTF-8-by-Default_Watermarked.5bc9458d892f.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/Python-3.15-Preview-UTF-8-by-Default_Watermarked.5bc9458d892f.jpg 1920w&quot; sizes=&quot;(min-width: 1200px) 142px, (min-width: 1000px) 122px, (min-width: 780px) 112px, (min-width: 580px) 139px, calc(100vw - 62px)&quot;&gt;


          &lt;div class=&quot;card-img-overlay d-flex align-items-center&quot;&gt;
            &lt;div class=&quot;mx-auto&quot;&gt;
              &lt;span class=&quot;text-light&quot; style=&quot;opacity: 0.90;&quot;&gt;&lt;span class=&quot;icon baseline scale2x&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.8f1dcd28e216.svg#@quiz&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/a&gt;

    &lt;/div&gt;

    &lt;div class=&quot;col position-relative&quot;&gt;
      &lt;div class=&quot;mt-3 d-md-none&quot;&gt;&lt;/div&gt; 
      &lt;p class=&quot;small text-muted mb-0&quot;&gt;&lt;strong&gt;Interactive Quiz&lt;/strong&gt;&lt;/p&gt;
      &lt;a href=&quot;/quizzes/python315-utf8-default/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;Python 3.15 Preview: UTF-8 by Default&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;Test your understanding of Python 3.15&#x27;s UTF-8 default, from the origins of the old locale-based encoding to passing explicit encodings in your code.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;

&lt;h2 id=&quot;meet-python-315s-utf-8-default&quot;&gt;Meet Python 3.15’s UTF-8 Default&lt;a class=&quot;headerlink&quot; href=&quot;#meet-python-315s-utf-8-default&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;It helps to understand why the default &lt;a href=&quot;/ref/glossary/text-encoding/&quot; class=&quot;ref-link&quot;&gt;text encoding&lt;/a&gt; behavior was a problem in Python versions older than 3.15. Take the built-in &lt;code&gt;open()&lt;/code&gt; &lt;a href=&quot;/ref/glossary/function/&quot; class=&quot;ref-link&quot;&gt;function&lt;/a&gt; as a baseline. Whenever you omitted the &lt;code&gt;encoding&lt;/code&gt; &lt;a href=&quot;/ref/glossary/argument/&quot; class=&quot;ref-link&quot;&gt;argument&lt;/a&gt; when opening a &lt;a href=&quot;/ref/glossary/text-file/&quot; class=&quot;ref-link&quot;&gt;text file&lt;/a&gt;, Python fell back to whatever &lt;a href=&quot;/ref/stdlib/locale/&quot; class=&quot;ref-link&quot;&gt;&lt;code&gt;locale.getencoding()&lt;/code&gt;&lt;/a&gt; returned on your operating system.&lt;/p&gt;
&lt;div class=&quot;alert alert-primary&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; For a refresher on how text encodings work before you dig in, check out the &lt;a href=&quot;https://realpython.com/python-encodings-guide/&quot;&gt;Unicode &amp;amp; Character Encodings in Python: A Painless Guide&lt;/a&gt; tutorial.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;On Windows, that fallback was the ANSI code page—the legacy character set that Windows selects from your system’s regional settings. Common examples are &lt;code&gt;cp1252&lt;/code&gt; in the Americas and Western Europe, &lt;code&gt;cp1251&lt;/code&gt; in Cyrillic-script regions, and &lt;code&gt;cp932&lt;/code&gt; in Japan.&lt;/p&gt;
&lt;p&gt;On Unix, it was the codeset from your &lt;a href=&quot;https://docs.python.org/3/library/locale.html#locale.LC_CTYPE&quot;&gt;&lt;code&gt;LC_CTYPE&lt;/code&gt;&lt;/a&gt; locale, which was &lt;code&gt;utf-8&lt;/code&gt; on a modern Linux or macOS system but plain &lt;a href=&quot;/ref/glossary/ascii/&quot; class=&quot;ref-link&quot;&gt;&lt;code&gt;ascii&lt;/code&gt;&lt;/a&gt; under a bare &lt;code&gt;C&lt;/code&gt; or &lt;code&gt;POSIX&lt;/code&gt; locale. The latter two are the minimal default locales that a system uses when nothing else is configured, which is often the case in containers and CI runners. You end up with the same code but different text encoding or decoding behaviors depending on where the code runs.&lt;/p&gt;
&lt;p&gt;This inconsistent behavior can raise &lt;code&gt;UnicodeDecodeError&lt;/code&gt; or &lt;code&gt;UnicodeEncodeError&lt;/code&gt; when reading or writing text files, respectively. It can also produce mojibake, as you saw earlier, with no error at all.&lt;/p&gt;
&lt;div class=&quot;alert alert-primary&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The inconsistent text encoding behavior reaches far beyond the built-in &lt;code&gt;open()&lt;/code&gt; function. The same encoding rule applies to &lt;a href=&quot;https://realpython.com/python-pathlib/&quot;&gt;&lt;code&gt;pathlib&lt;/code&gt;&lt;/a&gt; &lt;a href=&quot;/ref/glossary/method/&quot; class=&quot;ref-link&quot;&gt;methods&lt;/a&gt; like &lt;code&gt;Path.read_text()&lt;/code&gt; and &lt;code&gt;Path.write_text()&lt;/code&gt;, the text modes of &lt;code&gt;gzip.open()&lt;/code&gt;, &lt;code&gt;bz2.open()&lt;/code&gt;, and &lt;code&gt;lzma.open()&lt;/code&gt;, and &lt;a href=&quot;https://realpython.com/python-subprocess/&quot;&gt;&lt;code&gt;subprocess&lt;/code&gt;&lt;/a&gt; calls that pass &lt;code&gt;text=True&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;It also affects the text-mode files from &lt;a href=&quot;/ref/stdlib/tempfile/&quot; class=&quot;ref-link&quot;&gt;&lt;code&gt;tempfile&lt;/code&gt;&lt;/a&gt;, &lt;code&gt;configparser.ConfigParser.read()&lt;/code&gt;, and &lt;code&gt;logging.FileHandler&lt;/code&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a href=&quot;/ref/computer-science-glossary/utf-8/&quot; class=&quot;ref-link&quot;&gt;UTF-8&lt;/a&gt; became the de facto standard everywhere long ago, except in Python’s own default. It’s the standard for &lt;a href=&quot;/ref/glossary/source-code/&quot; class=&quot;ref-link&quot;&gt;source code&lt;/a&gt; files, &lt;a href=&quot;https://realpython.com/python-json/&quot;&gt;JSON&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python-toml/&quot;&gt;TOML&lt;/a&gt;, and &lt;a href=&quot;https://realpython.com/python-yaml/&quot;&gt;YAML&lt;/a&gt;, as well as on the web and in other programming languages like Go, Rust, and Java. On top of that, every mainstream editor, such as &lt;a href=&quot;https://realpython.com/advanced-visual-studio-code-python/&quot;&gt;Visual Studio Code&lt;/a&gt;, uses it out of the box.&lt;/p&gt;
&lt;p&gt;Python 3.15 closes that gap through &lt;a href=&quot;https://peps.python.org/pep-0686/&quot;&gt;PEP 686&lt;/a&gt;. Text &lt;a href=&quot;/ref/glossary/input-output/&quot; class=&quot;ref-link&quot;&gt;input/output (I/O)&lt;/a&gt; without an explicit encoding now uses UTF-8 no matter which operating system or locale you’re using.&lt;/p&gt;
&lt;p&gt;The table below summarizes the default text encoding that &lt;code&gt;open()&lt;/code&gt; picks before and after Python 3.15:&lt;/p&gt;
&lt;div class=&quot;table-responsive&quot;&gt;
&lt;table class=&quot;table table-hover&quot;&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Scenario&lt;/th&gt;
&lt;th&gt;Default up to 3.14&lt;/th&gt;
&lt;th&gt;Default in 3.15+&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Windows&lt;/td&gt;
&lt;td&gt;ANSI code page (&lt;code&gt;cp1252&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;&lt;code&gt;utf-8&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Linux/macOS (UTF-8 locale)&lt;/td&gt;
&lt;td&gt;&lt;code&gt;utf-8&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;utf-8&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Any OS under a &lt;code&gt;C&lt;/code&gt;/&lt;code&gt;POSIX&lt;/code&gt; locale&lt;/td&gt;
&lt;td&gt;&lt;code&gt;ascii&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;utf-8&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;encoding=&quot;&amp;lt;your_preferred_encoding&amp;gt;&quot;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;as given&lt;/td&gt;
&lt;td&gt;as given&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;The rows that change are the ones that used to depend on the operating system or the locale. On a UTF-8 Linux or macOS system, your everyday runs look the same, but the &lt;code&gt;C&lt;/code&gt;/&lt;code&gt;POSIX&lt;/code&gt; row still applies to you, since containers, cron jobs, and CI runners often start under a bare &lt;code&gt;C&lt;/code&gt; locale. Your code also has to decode correctly on other people’s machines. On Windows, this change removes a whole class of bugs.&lt;/p&gt;
&lt;div class=&quot;alert alert-primary&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong&gt;A bit of history:&lt;/strong&gt; This text encoding gap has a long history of tripping up real users. &lt;a href=&quot;https://peps.python.org/pep-0597/&quot;&gt;PEP 597&lt;/a&gt; recounts the classic case from the days of &lt;a href=&quot;https://setuptools.pypa.io/en/latest/userguide/quickstart.html&quot;&gt;&lt;code&gt;setup.py&lt;/code&gt;&lt;/a&gt; scripts. &lt;a href=&quot;/ref/glossary/package/&quot; class=&quot;ref-link&quot;&gt;Package&lt;/a&gt; authors often wrote &lt;code&gt;long_description = open(&quot;README.md&quot;).read()&lt;/code&gt; in their &lt;code&gt;setup.py&lt;/code&gt; file. This line worked fine on Linux and macOS, but it failed with a &lt;code&gt;UnicodeDecodeError&lt;/code&gt; on Windows if the target &lt;a href=&quot;https://realpython.com/readme-python-project/&quot;&gt;&lt;code&gt;README.md&lt;/code&gt;&lt;/a&gt; contained emojis or accented characters.&lt;/p&gt;
&lt;p&gt;That specific example is dated now because modern Python projects rely on &lt;a href=&quot;https://realpython.com/python-pyproject-toml/&quot;&gt;&lt;code&gt;pyproject.toml&lt;/code&gt;&lt;/a&gt; instead of &lt;code&gt;setup.py&lt;/code&gt;. As a result, this particular bug rarely bites anymore. Still, it captures the root problem perfectly: the same bare &lt;code&gt;open()&lt;/code&gt; call decoding differently depending on where it runs. That’s exactly what the new default fixes.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;If you want to go deeper into how character encodings work under the hood, Real Python’s video course on &lt;a href=&quot;https://realpython.com/courses/python-unicode/&quot;&gt;Unicode in Python: Working With Character Encodings&lt;/a&gt; covers code points, byte representations, and the built-in functions for converting between them.&lt;/p&gt;
&lt;p&gt;Now that you understand the problem, it’s time to try out the new text encoding default on your own.&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python315-utf8-default/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python315-utf8-default/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Build Your Own Face Recognition Tool With Python</title>
      <id>https://realpython.com/face-recognition-with-python/</id>
      <link href="https://realpython.com/face-recognition-with-python/"/>
      <updated>2026-09-01T14:00:00+00:00</updated>
      <summary>In this tutorial, you&#x27;ll build your own face recognition command-line tool with Python. You&#x27;ll learn how to use face detection to identify faces in an image and label them using face recognition. With this knowledge, you can create your own face recognition tool from start to finish!</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Do you have a phone that you can unlock with your face? Have you ever wondered how that works? Have you ever wanted to build your own face recognizer? With Python, some data, and a few helper packages, you can create your very own. In this project, you’ll use &lt;strong&gt;face detection&lt;/strong&gt; and &lt;strong&gt;face recognition&lt;/strong&gt; to identify faces in a given image.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this tutorial, you’ll build your own face recognition tool using:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Face detection to &lt;strong&gt;find faces&lt;/strong&gt; in an image&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&quot;/ref/ai-coding-glossary/machine-learning/&quot; class=&quot;ref-link&quot;&gt;Machine learning&lt;/a&gt;&lt;/strong&gt; to power face recognition for given images&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Command-line arguments&lt;/strong&gt; to direct your application with &lt;code&gt;argparse&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Bounding boxes to label faces with the help of &lt;strong&gt;Pillow&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;With these techniques, you’ll gain a solid foundation in &lt;strong&gt;computer vision&lt;/strong&gt;. After implementing your knowledge in this project, you’ll be ready to apply these techniques in solving real-world problems beyond face recognition.&lt;/p&gt;
&lt;p&gt;Click the link below to download the complete source code for this project:&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown&gt;Free Bonus:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/face-recognition-python-code/&quot; class=&quot;alert-link&quot; data-bs-toggle=&quot;modal&quot; data-bs-target=&quot;#modal-face-recognition-python-code&quot; markdown&gt;Click here to download the full source code&lt;/a&gt; to build your own face recognition app with Python.&lt;/p&gt;
&lt;/div&gt;
&lt;h2 id=&quot;demo&quot;&gt;Demo&lt;a class=&quot;headerlink&quot; href=&quot;#demo&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;When you’re done with this project, you’ll have a face recognition application that you can train on any set of images. Once it’s trained, you’ll be able to give your application a new image, and the app will draw boxes on any faces that it finds and label each face by name:&lt;/p&gt;
&lt;div&gt;





&lt;div class=&quot;ratio rounded overflow-hidden mb-3 bg-body-tertiary&quot; style=&quot;aspect-ratio: 3360/1890;&quot;&gt;
  &lt;video-animation data-src=&quot;https://stream.realpython.com/6d3a28d1-67cf-421e-93f6-8ff4ef767418/playlist.m3u8&quot;&gt;
    &lt;video muted loop playsinline preload=&quot;none&quot; poster=&quot;https://stream.realpython.com/6d3a28d1-67cf-421e-93f6-8ff4ef767418/thumbnail.jpg?width=1280&quot; disablepictureinpicture disableremoteplayback&gt;&lt;/video&gt;
  &lt;/video-animation&gt;
&lt;/div&gt;



&lt;/div&gt;

&lt;p&gt;In this video, you saw this project in action: &lt;a href=&quot;/ref/ai-coding-glossary/training/&quot; class=&quot;ref-link&quot;&gt;training&lt;/a&gt; a new model on a list of images, validating it against an image with known faces, and then testing it with a brand-new image. After finishing this tutorial, you’ll have your very own application that works just like this.&lt;/p&gt;
&lt;h2 id=&quot;project-overview&quot;&gt;Project Overview&lt;a class=&quot;headerlink&quot; href=&quot;#project-overview&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Your program will be a typical command-line application, but it’ll offer some impressive capabilities. To accomplish this feat, you’ll first use &lt;strong&gt;face detection&lt;/strong&gt;, or the ability to find faces in an image. Then, you’ll implement &lt;strong&gt;face recognition&lt;/strong&gt;, which is the ability to identify detected faces in an image. To that end, your program will do three primary tasks:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Train a new face recognition model.&lt;/li&gt;
&lt;li&gt;Validate the model.&lt;/li&gt;
&lt;li&gt;Test the model.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;When &lt;strong&gt;training&lt;/strong&gt;, your face recognizer will need to open and read many image files. It’ll also need to know who appears in each one. To accomplish this, you’ll set up a directory structure to give your program information about the data. Specifically, your project directory will contain three data directories:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;training/&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;validation/&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;output/&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;You can put images directly into &lt;code&gt;validation/&lt;/code&gt;. For &lt;code&gt;training/&lt;/code&gt;, you should have images separated by subject into directories with the subject’s name.&lt;/p&gt;
&lt;p&gt;Setting your training directory up this way will allow you to give your face recognizer the information that it needs to associate a label—the person pictured—with the underlying image data.&lt;/p&gt;
&lt;div class=&quot;alert alert-primary&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; This strategy works well for training on images that contain a single face. If you want to train on images with multiple identifiable faces, then you’ll have to investigate an alternative strategy for marking the faces in the training images.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;You’ll walk through this project step by step, starting with preparing your environment and data. After that, you’ll be ready to load your training data and get to work on training your model to recognize unlabeled faces.&lt;/p&gt;
&lt;p&gt;Once your app is able to do that, you’ll need a way to display your results. You’ll build a command-line interface so that users can interact with your app. &lt;/p&gt;
&lt;p&gt;Finally, you’ll run the app through all of its paces. This is of vital importance because it’ll help you see your application through the eyes of a user. That way, you can better understand how your application works in practice, a process that’s key to finding bugs.&lt;/p&gt;
&lt;h2 id=&quot;prerequisites&quot;&gt;Prerequisites&lt;a class=&quot;headerlink&quot; href=&quot;#prerequisites&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;To build this face recognition application, you &lt;em&gt;won’t&lt;/em&gt; need advanced linear algebra, deep machine learning algorithm knowledge, or even any experience with OpenCV, one of the leading Python libraries enabling a lot of computer vision work.&lt;/p&gt;
&lt;p&gt;Instead, you should have an intermediate-level understanding of Python. You should be comfortable with:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Installing &lt;a href=&quot;https://realpython.com/what-is-pip/&quot;&gt;third-party modules with &lt;code&gt;pip&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Using &lt;a href=&quot;https://realpython.com/command-line-interfaces-python-argparse/&quot;&gt;&lt;code&gt;argparse&lt;/code&gt; to create a command-line interface&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Opening and reading files with &lt;a href=&quot;https://realpython.com/python-pathlib/&quot;&gt;&lt;code&gt;pathlib&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Serializing and deserializing Python &lt;a href=&quot;/ref/glossary/object/&quot; class=&quot;ref-link&quot;&gt;objects&lt;/a&gt; with &lt;a href=&quot;https://realpython.com/python-pickle-module/&quot;&gt;&lt;code&gt;pickle&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/face-recognition-with-python/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/face-recognition-with-python/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Primer on Python Decorators</title>
      <id>https://realpython.com/primer-on-python-decorators/</id>
      <link href="https://realpython.com/primer-on-python-decorators/"/>
      <updated>2026-09-01T14:00:00+00:00</updated>
      <summary>In this tutorial, you&#x27;ll look at what Python decorators are and how you define and use them. Decorators can make your code more readable and reusable. Come take a look at how decorators work under the hood and practice writing your own decorators.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Python decorators allow you to modify or extend the behavior of functions and methods without changing their actual code. When you use a Python decorator, you wrap a function with another function, which takes the original function as an &lt;a href=&quot;/ref/glossary/argument/&quot; class=&quot;ref-link&quot;&gt;argument&lt;/a&gt; and returns its modified version. This technique provides a simple way to implement &lt;a href=&quot;/ref/glossary/higher-order-function/&quot; class=&quot;ref-link&quot;&gt;higher-order functions&lt;/a&gt; in Python, enhancing code reusability and readability.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;By the end of this tutorial, you’ll understand that:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Practical use cases&lt;/strong&gt; for decorators include &lt;a href=&quot;/ref/best-practices/logging/&quot; class=&quot;ref-link&quot;&gt;logging&lt;/a&gt;, enforcing access control, &lt;a href=&quot;/ref/computer-science-glossary/caching/&quot; class=&quot;ref-link&quot;&gt;caching&lt;/a&gt; results, and measuring execution time.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Custom decorators&lt;/strong&gt; are written by defining a function that takes another function as an argument, defines a nested wrapper function, and returns the wrapper.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Multiple decorators&lt;/strong&gt; can be applied to a single function by stacking them before the function definition.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;order of decorators&lt;/strong&gt; impacts the final output since each decorator wraps the next, influencing the behavior of the decorated function.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can find all the examples from this tutorial by downloading the accompanying materials below:&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown&gt;Get Your Code:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/primer-on-python-decorators-code/&quot; class=&quot;alert-link&quot; data-bs-toggle=&quot;modal&quot; data-bs-target=&quot;#modal-primer-on-python-decorators-code&quot; markdown&gt;Click here to download the free sample code&lt;/a&gt; that shows you how to create and use Python decorators.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown&gt;Free Bonus:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/power-of-decorators-fixed/&quot; class=&quot;alert-link&quot; data-bs-toggle=&quot;modal&quot; data-bs-target=&quot;#modal-power-of-decorators-fixed&quot; markdown&gt;Click here to get access to a free “The Power of Python Decorators” guide&lt;/a&gt; that shows you three advanced decorator patterns and techniques you can use to write cleaner and more Pythonic programs.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown&gt;Decorators Cheat Sheet:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/decorators-cheatsheet/&quot; class=&quot;alert-link&quot; data-bs-toggle=&quot;modal&quot; data-bs-target=&quot;#modal-decorators-cheatsheet&quot; markdown&gt;Click here to get access to a free three-page Python decorators cheat sheet&lt;/a&gt; that summarizes the techniques explained in this tutorial.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown&gt;Decorators Q&amp;amp;A Transcript:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/decorators-qa-2019/&quot; class=&quot;alert-link&quot; data-bs-toggle=&quot;modal&quot; data-bs-target=&quot;#modal-decorators-qa-2019&quot; markdown&gt;Click here to get access to a 25-page chat log from our Python decorators Q&amp;amp;A session&lt;/a&gt; in the Real Python Community Slack where we discussed common decorator questions.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;container border rounded text-wrap-pretty my-3&quot;&gt;

  &lt;p class=&quot;my-3&quot;&gt;&lt;mark class=&quot;marker-highlight&quot;&gt;&lt;strong&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.8f1dcd28e216.svg#@quiz&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt; Take the Quiz:&lt;/strong&gt;&lt;/mark&gt; Test your knowledge with our interactive “Primer on Python Decorators” quiz. You’ll receive a score upon completion to help you track your learning progress:&lt;/p&gt;

  &lt;hr&gt;

  &lt;div class=&quot;row my-3&quot;&gt;
    &lt;div class=&quot;col-12 col-sm-4 col-md-3 align-self-center&quot;&gt;

      &lt;a href=&quot;/quizzes/decorators/&quot; tabindex=&quot;-1&quot;&gt;
        &lt;div class=&quot;ratio ratio-16x9&quot;&gt;

            &lt;img class=&quot;card-img-top m-0 p-0 rounded&quot; style=&quot;object-fit: contain; background: #abe5b2;&quot; alt=&quot;Python Decorators&quot; src=&quot;https://files.realpython.com/media/Primer-on-Python-Decorators_Watermarked.d0da542fa3fc.jpg&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/Primer-on-Python-Decorators_Watermarked.d0da542fa3fc.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/Primer-on-Python-Decorators_Watermarked.d0da542fa3fc.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/Primer-on-Python-Decorators_Watermarked.d0da542fa3fc.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/Primer-on-Python-Decorators_Watermarked.d0da542fa3fc.jpg 1920w&quot; sizes=&quot;(min-width: 1200px) 142px, (min-width: 1000px) 122px, (min-width: 780px) 112px, (min-width: 580px) 139px, calc(100vw - 62px)&quot;&gt;


          &lt;div class=&quot;card-img-overlay d-flex align-items-center&quot;&gt;
            &lt;div class=&quot;mx-auto&quot;&gt;
              &lt;span class=&quot;text-light&quot; style=&quot;opacity: 0.90;&quot;&gt;&lt;span class=&quot;icon baseline scale2x&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.8f1dcd28e216.svg#@quiz&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/a&gt;

    &lt;/div&gt;

    &lt;div class=&quot;col position-relative&quot;&gt;
      &lt;div class=&quot;mt-3 d-md-none&quot;&gt;&lt;/div&gt; 
      &lt;p class=&quot;small text-muted mb-0&quot;&gt;&lt;strong&gt;Interactive Quiz&lt;/strong&gt;&lt;/p&gt;
      &lt;a href=&quot;/quizzes/decorators/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;Primer on Python Decorators&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;In this quiz, you&#x27;ll revisit the foundational concepts of what Python decorators are and how to create and use them.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;

&lt;h2 id=&quot;python-functions&quot;&gt;Python Functions&lt;a class=&quot;headerlink&quot; href=&quot;#python-functions&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;In order to understand decorators, you must first understand some finer points of how &lt;a href=&quot;https://realpython.com/defining-your-own-python-function/&quot;&gt;functions&lt;/a&gt; work. There are many aspects to functions, but in the context of decorators, &lt;strong&gt;a function returns a value based on the given arguments&lt;/strong&gt;. Here’s a basic example:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;pycon&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--blue&quot;&gt;
    &lt;span class=&quot;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Language: &lt;/span&gt;Python&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; aria-label=&quot;Toggle prompts and output&quot; role=&quot;button&quot; tabindex=&quot;0&quot;&gt;&lt;span class=&quot;icon baseline js-codeblock-output-on codeblock__header--icon-lower&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.8f1dcd28e216.svg#regular--rectangle-terminal&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;add_one&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;number&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;number&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;...&lt;/span&gt;

&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;add_one&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;3&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot; aria-label=&quot;Copy to clipboard&quot;&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.8f1dcd28e216.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;p&gt;In general, functions in Python may also have side effects rather than just turning an input into an output. &lt;a href=&quot;https://realpython.com/python-print/&quot;&gt;The &lt;code&gt;print()&lt;/code&gt; function&lt;/a&gt; is an example of this: it &lt;a href=&quot;https://realpython.com/python-return-statement/&quot;&gt;returns&lt;/a&gt; &lt;a href=&quot;https://realpython.com/null-in-python/&quot;&gt;&lt;code&gt;None&lt;/code&gt;&lt;/a&gt; while having the side effect of outputting something to the console. However, to understand decorators, it’s enough to think about functions as tools that turn given arguments into values.&lt;/p&gt;
&lt;h3 id=&quot;first-class-objects&quot;&gt;First-Class Objects&lt;a class=&quot;headerlink&quot; href=&quot;#first-class-objects&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;In &lt;a href=&quot;https://realpython.com/python-functional-programming/&quot;&gt;functional programming&lt;/a&gt;, you work almost entirely with pure functions that don’t have side effects. While not a purely functional language, Python supports many functional programming concepts, including treating functions as &lt;a href=&quot;https://dbader.org/blog/python-first-class-functions&quot;&gt;first-class objects&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This means that &lt;em&gt;functions can be passed around and used as arguments&lt;/em&gt;, just like &lt;a href=&quot;https://realpython.com/python-data-types/&quot;&gt;any other object like &lt;code&gt;str&lt;/code&gt;, &lt;code&gt;int&lt;/code&gt;, &lt;code&gt;float&lt;/code&gt;, &lt;code&gt;list&lt;/code&gt;, and so on&lt;/a&gt;. Consider the following three functions:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;python&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--blue&quot;&gt;
    &lt;span class=&quot;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Language: &lt;/span&gt;Python&lt;/span&gt;
    &lt;span class=&quot;me-2&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Filename: &lt;/span&gt;&lt;code style=&quot;color: inherit; background: inherit;&quot;&gt;greeters.py&lt;/code&gt;&lt;/span&gt;
    &lt;div class=&quot;noselect&quot;&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;say_hello&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;sa&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Hello &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;be_awesome&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;sa&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Yo &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;, together we&#x27;re the awesomest!&quot;&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;greet_bob&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;greeter_func&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;greeter_func&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Bob&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot; aria-label=&quot;Copy to clipboard&quot;&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.8f1dcd28e216.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;p&gt;Here, &lt;code&gt;say_hello()&lt;/code&gt; and &lt;code&gt;be_awesome()&lt;/code&gt; are regular functions that expect a name given as a string. The &lt;code&gt;greet_bob()&lt;/code&gt; function, however, expects a function as its argument. You can, for example, pass it the &lt;code&gt;say_hello()&lt;/code&gt; or the &lt;code&gt;be_awesome()&lt;/code&gt; function.&lt;/p&gt;
&lt;p&gt;To test your functions, you can run your code in interactive mode. You do this with the &lt;code&gt;-i&lt;/code&gt; flag. For example, if your code is in a file named &lt;code&gt;greeters.py&lt;/code&gt;, then you run &lt;code&gt;python -i greeters.py&lt;/code&gt;:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;pycon&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--blue&quot;&gt;
    &lt;span class=&quot;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Language: &lt;/span&gt;Python&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; aria-label=&quot;Toggle prompts and output&quot; role=&quot;button&quot; tabindex=&quot;0&quot;&gt;&lt;span class=&quot;icon baseline js-codeblock-output-on codeblock__header--icon-lower&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.8f1dcd28e216.svg#regular--rectangle-terminal&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;greet_bob&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;say_hello&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#x27;Hello Bob&#x27;&lt;/span&gt;

&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;greet_bob&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;be_awesome&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&quot;Yo Bob, together we&#x27;re the awesomest!&quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot; aria-label=&quot;Copy to clipboard&quot;&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.8f1dcd28e216.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;p&gt;Note that &lt;code&gt;greet_bob(say_hello)&lt;/code&gt; refers to two functions, &lt;code&gt;greet_bob()&lt;/code&gt; and &lt;code&gt;say_hello&lt;/code&gt;, but in different ways. The &lt;code&gt;say_hello&lt;/code&gt; function is named without parentheses. This means that only a reference to the function is passed. The function isn’t executed. The &lt;code&gt;greet_bob()&lt;/code&gt; function, on the other hand, is written with parentheses, so it will be called as usual.&lt;/p&gt;
&lt;p&gt;This is an important distinction that’s crucial for how functions work as first-class objects. A function name without parentheses is a reference to a function, while a function name with trailing parentheses calls the function and refers to its return value.&lt;/p&gt;
&lt;h3 id=&quot;inner-functions&quot;&gt;Inner Functions&lt;a class=&quot;headerlink&quot; href=&quot;#inner-functions&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;It’s possible to &lt;a href=&quot;https://realpython.com/defining-your-own-python-function/&quot;&gt;define functions&lt;/a&gt; &lt;em&gt;inside other functions&lt;/em&gt;. Such functions are called &lt;a href=&quot;https://realpython.com/inner-functions-what-are-they-good-for/&quot;&gt;inner functions&lt;/a&gt;. Here’s an example of a function with two inner functions:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;python&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--blue&quot;&gt;
    &lt;span class=&quot;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Language: &lt;/span&gt;Python&lt;/span&gt;
    &lt;span class=&quot;me-2&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Filename: &lt;/span&gt;&lt;code style=&quot;color: inherit; background: inherit;&quot;&gt;inner_functions.py&lt;/code&gt;&lt;/span&gt;
    &lt;div class=&quot;noselect&quot;&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;parent&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;():&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Printing from parent()&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

    &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;first_child&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;():&lt;/span&gt;
        &lt;span class=&quot;nb&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Printing from first_child()&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

    &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;second_child&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;():&lt;/span&gt;
        &lt;span class=&quot;nb&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Printing from second_child()&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

    &lt;span class=&quot;n&quot;&gt;second_child&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;first_child&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot; aria-label=&quot;Copy to clipboard&quot;&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.8f1dcd28e216.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/primer-on-python-decorators/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/primer-on-python-decorators/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>How to Get Started With Ollama</title>
      <id>https://realpython.com/courses/get-started-with-ollama/</id>
      <link href="https://realpython.com/courses/get-started-with-ollama/"/>
      <updated>2026-09-01T14:00:00+00:00</updated>
      <summary>Learn how to install Ollama, pull local models, and connect them to your Python code using the chat and text generation interfaces.</summary>
      <content type="html">
        &lt;p&gt;Integrating local large language models (LLMs) into your Python projects with Ollama is a great way to improve privacy, reduce costs, and build offline-capable AI-powered apps.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Ollama&lt;/strong&gt; is an open-source platform that makes it straightforward to run modern LLMs locally on your machine. Once you&amp;rsquo;ve set up Ollama and pulled the models you want to use, you can connect to them from Python using the &lt;code&gt;ollama&lt;/code&gt; library.&lt;/p&gt;
&lt;p&gt;In this video course, you&amp;rsquo;ll integrate local LLMs into your Python projects using the Ollama platform and its Python SDK.&lt;/p&gt;
&lt;p&gt;First, you&amp;rsquo;ll set up Ollama and pull a couple of LLMs. Then, you&amp;rsquo;ll learn how to use chat and text generation from your Python code. These skills will enable you to build AI-powered apps that run locally, ensuring better privacy and reducing costs.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast – Episode #309: Exploring Complex Systems &amp; Maintainable Data Science Pipelines</title>
      <id>https://realpython.com/podcasts/rpp/309/</id>
      <link href="https://realpython.com/podcasts/rpp/309/"/>
      <updated>2026-08-28T12:00:00+00:00</updated>
      <summary>What are the key characteristics of complex systems, and what are practical patterns for tackling complex coding problems? Christopher Trudeau is back on the show this week with another batch of PyCoder&#x27;s Weekly articles and projects.</summary>
      <content type="html">
        &lt;p&gt;What are the key characteristics of complex systems, and what are practical patterns for tackling complex coding problems? Christopher Trudeau is back on the show this week with another batch of PyCoder&#x27;s Weekly articles and projects.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Python print() Function: Go Beyond the Basics</title>
      <id>https://realpython.com/courses/python-print/</id>
      <link href="https://realpython.com/courses/python-print/"/>
      <updated>2026-08-25T14:00:00+00:00</updated>
      <summary>Learn about Python&#x27;s print() function, discover its lesser-known features, avoid common mistakes, and know when to use a better alternative.</summary>
      <content type="html">
        &lt;p&gt;If you&amp;rsquo;re like most Python users, including us, then you probably started your Python journey by learning about &lt;strong&gt;&lt;code&gt;print()&lt;/code&gt;&lt;/strong&gt;. It helped you write your very own &lt;code&gt;Hello World&lt;/code&gt; one-liner. You can use it to display formatted messages onto the screen and perhaps find some bugs. But if you think that&amp;rsquo;s all there is to know about Python&amp;rsquo;s &lt;code&gt;print()&lt;/code&gt;, then you&amp;rsquo;re missing out on a lot!&lt;/p&gt;
&lt;p&gt;Keep reading to take full advantage of this underappreciated little function. This course will get you up to speed with using Python &lt;code&gt;print()&lt;/code&gt; effectively. Prepare for a deep dive as you go through the sections. You may be surprised how much &lt;code&gt;print()&lt;/code&gt; has to offer!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;By the end of this course, you&amp;rsquo;ll know how to:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Avoid common mistakes with Python&amp;rsquo;s &lt;code&gt;print()&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Deal with newlines, character encodings, and buffering&lt;/li&gt;
&lt;li&gt;Write text to files&lt;/li&gt;
&lt;li&gt;Mock &lt;code&gt;print()&lt;/code&gt; in unit tests&lt;/li&gt;
&lt;li&gt;Build advanced user interfaces in the terminal&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;alert alert-primary&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; &lt;code&gt;print()&lt;/code&gt; was a major addition to Python 3, in which it replaced the old &lt;code&gt;print&lt;/code&gt; statement available in Python 2.&lt;/p&gt;
&lt;p&gt;There were a number of good reasons for that, as you&amp;rsquo;ll see shortly. Although this tutorial focuses on Python 3, it does show the old way of printing in Python for reference.&lt;/p&gt;
&lt;/div&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast – Episode #308: Navigating Silent Failures in AI: Strategies for Effective Oversight</title>
      <id>https://realpython.com/podcasts/rpp/308/</id>
      <link href="https://realpython.com/podcasts/rpp/308/"/>
      <updated>2026-08-21T12:00:00+00:00</updated>
      <summary>Why do AI systems silently fail? How can you set up a system that produces results while also reviewing and validating the work? This week on the show, Calvin Hendryx-Parker returns to discuss his recent talk &quot;Orchestrate Agentic AI: Context, Checklists, and No-Miss Reviews.&quot;</summary>
      <content type="html">
        &lt;p&gt;Why do AI systems silently fail? How can you set up a system that produces results while also reviewing and validating the work? This week on the show, Calvin Hendryx-Parker returns to discuss his recent talk &quot;Orchestrate Agentic AI: Context, Checklists, and No-Miss Reviews.&quot;&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Working With Python&#x27;s deque</title>
      <id>https://realpython.com/courses/working-with-pythons-deque/</id>
      <link href="https://realpython.com/courses/working-with-pythons-deque/"/>
      <updated>2026-08-18T14:00:00+00:00</updated>
      <summary>Learn how to use Python&#x27;s deque to efficiently append and pop items from both ends, build queues and stacks, and set maxlen for bounded history.</summary>
      <content type="html">
        &lt;p&gt;You can use Python&amp;rsquo;s &lt;code&gt;deque&lt;/code&gt; for efficient appends and pops at both ends of a sequence-like data type. These capabilities are critical when you need to implement queue and stack data structures that operate efficiently even under heavy workloads.&lt;/p&gt;
&lt;p&gt;In this video course, you&amp;rsquo;ll learn how &lt;code&gt;deque&lt;/code&gt; works, when to use it over a &lt;code&gt;list&lt;/code&gt;, and how to apply it in real code.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;By the end of this course, you&amp;rsquo;ll understand that:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;deque&lt;/code&gt; internally uses a &lt;strong&gt;doubly &lt;a href=&quot;/ref/computer-science-glossary/linked-list/&quot; class=&quot;ref-link&quot;&gt;linked list&lt;/a&gt;&lt;/strong&gt;, so end operations are &lt;em&gt;O(1)&lt;/em&gt; while random indexing is &lt;em&gt;O(n)&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;You can build a &lt;strong&gt;FIFO queue&lt;/strong&gt; with &lt;strong&gt;&lt;code&gt;.append()&lt;/code&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;code&gt;.popleft()&lt;/code&gt;&lt;/strong&gt;, and a &lt;strong&gt;LIFO stack&lt;/strong&gt; with &lt;strong&gt;&lt;code&gt;.append()&lt;/code&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;code&gt;.pop()&lt;/code&gt;&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;deque&lt;/code&gt; supports &lt;strong&gt;indexing&lt;/strong&gt; but doesn&amp;rsquo;t support &lt;strong&gt;slicing&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Passing a value to &lt;strong&gt;&lt;code&gt;maxlen&lt;/code&gt;&lt;/strong&gt; creates a bounded deque that &lt;strong&gt;drops items&lt;/strong&gt; from the opposite end when full.&lt;/li&gt;
&lt;li&gt;In CPython, &lt;strong&gt;&lt;code&gt;.append()&lt;/code&gt;&lt;/strong&gt;, &lt;strong&gt;&lt;code&gt;.appendleft()&lt;/code&gt;&lt;/strong&gt;, &lt;strong&gt;&lt;code&gt;.pop()&lt;/code&gt;&lt;/strong&gt;, &lt;strong&gt;&lt;code&gt;.popleft()&lt;/code&gt;&lt;/strong&gt;, and &lt;strong&gt;&lt;code&gt;len()&lt;/code&gt;&lt;/strong&gt; are &lt;strong&gt;thread-safe&lt;/strong&gt; for multithreaded use.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Up next, you&amp;rsquo;ll get started with &lt;code&gt;deque&lt;/code&gt;, benchmark it against &lt;code&gt;list&lt;/code&gt;, and explore how it shines in real-world use cases, such as queues, stacks, history buffers, and thread-safe producer-consumer setups.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast – Episode #307: Improving NumPy Performance on Free-Threaded Python</title>
      <id>https://realpython.com/podcasts/rpp/307/</id>
      <link href="https://realpython.com/podcasts/rpp/307/"/>
      <updated>2026-08-14T12:00:00+00:00</updated>
      <summary>What bottlenecks were preventing NumPy from scaling on free-threaded Python? Christopher Trudeau is back on the show this week with another batch of PyCoder&#x27;s Weekly articles and projects.</summary>
      <content type="html">
        &lt;p&gt;What bottlenecks were preventing NumPy from scaling on free-threaded Python? Christopher Trudeau is back on the show this week with another batch of PyCoder&#x27;s Weekly articles and projects.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Coding With OpenCode: AI-Assisted Python</title>
      <id>https://realpython.com/courses/coding-with-opencode-ai/</id>
      <link href="https://realpython.com/courses/coding-with-opencode-ai/"/>
      <updated>2026-08-11T14:00:00+00:00</updated>
      <summary>Learn how to use OpenCode for AI-assisted Python coding, using a free Gemini API key to analyze and refactor code right in your terminal.</summary>
      <content type="html">
        &lt;p&gt;OpenCode is an open-source AI coding agent that runs in your terminal and lets you analyze and refactor a Python project through conversational commands. In this video course, you&amp;rsquo;ll install it on your system, set it up with a free Google Gemini API key, and learn the basics of how to use it in your daily programming work.&lt;/p&gt;
&lt;p&gt;OpenCode works as a conversational assistant you explicitly direct. Ask it to analyze functions, refactor code, or explain issues. Press Enter to send your query, and you&amp;rsquo;ll get a response with full awareness of your project context. It supports more than seventy-five AI providers, including Anthropic, OpenAI, and Google Gemini.&lt;/p&gt;
&lt;p&gt;If you&amp;rsquo;re a Python developer who prefers working in the terminal, OpenCode offers deliberate, context-aware assistance and a customizable &lt;code&gt;AGENTS.md&lt;/code&gt; configuration file.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast – Episode #306: Programmatically Developing LLM Prompts With DSPy</title>
      <id>https://realpython.com/podcasts/rpp/306/</id>
      <link href="https://realpython.com/podcasts/rpp/306/"/>
      <updated>2026-08-07T12:00:00+00:00</updated>
      <summary>How can you move from manually writing prompts for an LLM application toward defining them programmatically? This week on the show, Brett Kennedy returns to discuss his new book &quot;Building LLM Applications with DSPy.&quot;</summary>
      <content type="html">
        &lt;p&gt;How can you move from manually writing prompts for an LLM application toward defining them programmatically? This week on the show, Brett Kennedy returns to discuss his new book &quot;Building LLM Applications with DSPy.&quot;&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Sending Emails Using Python</title>
      <id>https://realpython.com/courses/sending-emails-using-python/</id>
      <link href="https://realpython.com/courses/sending-emails-using-python/"/>
      <updated>2026-08-04T14:00:00+00:00</updated>
      <summary>Learn how to send emails with Python using SMTP and smtplib, attach files, format HTML messages, and personalize bulk emails.</summary>
      <content type="html">
        &lt;p&gt;You probably found this video course because you want to send emails with Python to automate confirmation messages, password resets, or scheduled notifications. Python&amp;rsquo;s standard library covers the whole pipeline, from making a server connection to building the message and sending it to one or many recipients. This course walks through every step in working code.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;By the end of this course, you&amp;rsquo;ll understand that:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A safe testing setup uses a &lt;strong&gt;throwaway Gmail account&lt;/strong&gt; with an &lt;strong&gt;app password&lt;/strong&gt;, a local &lt;code&gt;aiosmtpd&lt;/code&gt; debug server, or a privacy-focused provider like Posteo or Proton Mail.&lt;/li&gt;
&lt;li&gt;A secure SMTP session uses &lt;code&gt;.SMTP_SSL()&lt;/code&gt; with &lt;code&gt;ssl.create_default_context()&lt;/code&gt;, which &lt;strong&gt;validates the server certificate&lt;/strong&gt; and &lt;strong&gt;encrypts&lt;/strong&gt; your credentials and message content.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;EmailMessage&lt;/code&gt; class from the &lt;code&gt;email&lt;/code&gt; package assembles &lt;strong&gt;plain text&lt;/strong&gt;, &lt;strong&gt;HTML alternatives&lt;/strong&gt;, &lt;strong&gt;file attachments&lt;/strong&gt;, and &lt;strong&gt;personalized fields&lt;/strong&gt; through &lt;code&gt;.set_content()&lt;/code&gt;, &lt;code&gt;.add_alternative()&lt;/code&gt;, and &lt;code&gt;.add_attachment()&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Setting &lt;code&gt;msg[&quot;reply-to&quot;]&lt;/code&gt; or any other RFC 5322 header on an &lt;code&gt;EmailMessage&lt;/code&gt; routes &lt;strong&gt;replies&lt;/strong&gt; to a different mailbox than the sender address.&lt;/li&gt;
&lt;li&gt;For high-volume sending, &lt;strong&gt;transactional email services&lt;/strong&gt; like SendGrid, Mailgun, and Brevo provide deliverability, statistics, and &lt;strong&gt;API libraries&lt;/strong&gt; that go beyond what &lt;code&gt;smtplib&lt;/code&gt; alone offers.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Before you jump into the code, you&amp;rsquo;ll set up a throwaway email account or a local debug server so you can experiment freely without spamming real inboxes.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast – Episode #305: Should You Understand Your Entire Python Codebase?</title>
      <id>https://realpython.com/podcasts/rpp/305/</id>
      <link href="https://realpython.com/podcasts/rpp/305/"/>
      <updated>2026-07-31T12:00:00+00:00</updated>
      <summary>Should you understand the entirety of your codebase? How familiar are you with Python&#x27;s built-in functions? Christopher Trudeau is back on the show this week with another batch of PyCoder&#x27;s Weekly articles and projects.</summary>
      <content type="html">
        &lt;p&gt;Should you understand the entirety of your codebase? How familiar are you with Python&#x27;s built-in functions? Christopher Trudeau is back on the show this week with another batch of PyCoder&#x27;s Weekly articles and projects.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Managing Imports With Python&#x27;s __all__</title>
      <id>https://realpython.com/courses/managing-imports-dunder-all/</id>
      <link href="https://realpython.com/courses/managing-imports-dunder-all/"/>
      <updated>2026-07-28T14:00:00+00:00</updated>
      <summary>Learn how Python&#x27;s dunder all variable controls wildcard imports and shapes the public API your packages and modules expose.</summary>
      <content type="html">
        &lt;p&gt;Python has something called &lt;strong&gt;wildcard imports&lt;/strong&gt;, which look like &lt;code&gt;from module import *&lt;/code&gt;. This type of import allows you to quickly get all the objects from a module into your namespace. However, using this import on a package can be confusing because it&amp;rsquo;s not clear what you want to import: subpackages, modules, objects? Python has the &lt;strong&gt;&lt;code&gt;__all__&lt;/code&gt;&lt;/strong&gt; variable to work around this issue.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;__all__&lt;/code&gt; variable is a list of strings where each string represents the name of a variable, function, class, or module that you want to expose to wildcard imports.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this video course, you&amp;rsquo;ll:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Understand &lt;strong&gt;wildcard imports&lt;/strong&gt; in Python&lt;/li&gt;
&lt;li&gt;Use &lt;strong&gt;&lt;code&gt;__all__&lt;/code&gt;&lt;/strong&gt; to control the modules that you &lt;strong&gt;expose&lt;/strong&gt; to wildcard imports&lt;/li&gt;
&lt;li&gt;Control the &lt;strong&gt;names&lt;/strong&gt; that you expose in &lt;strong&gt;modules&lt;/strong&gt; and &lt;strong&gt;packages&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Explore &lt;strong&gt;other use cases&lt;/strong&gt; of the &lt;code&gt;__all__&lt;/code&gt; variable&lt;/li&gt;
&lt;li&gt;Learn some &lt;strong&gt;benefits&lt;/strong&gt; and &lt;strong&gt;best practices&lt;/strong&gt; of using &lt;code&gt;__all__&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To get the most out of this course, you should be familiar with a few Python concepts, including &lt;a href=&quot;https://realpython.com/python-modules-packages/&quot;&gt;modules and packages&lt;/a&gt;, and the &lt;a href=&quot;https://realpython.com/python-import/&quot;&gt;import&lt;/a&gt; system.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast – Episode #304: Configuring a Versatile LLM Harness &amp; Scraping the Web With Scrapy</title>
      <id>https://realpython.com/podcasts/rpp/304/</id>
      <link href="https://realpython.com/podcasts/rpp/304/"/>
      <updated>2026-07-24T12:00:00+00:00</updated>
      <summary>Which is more important, the model or the &quot;harness&quot; around an LLM? What are ways to assemble an efficient agentic developer workflow? This week on the show, Ayan Pahwa joins us to discuss harnessing, web scraping, and self-hosting Python applications.</summary>
      <content type="html">
        &lt;p&gt;Which is more important, the model or the &quot;harness&quot; around an LLM? What are ways to assemble an efficient agentic developer workflow? This week on the show, Ayan Pahwa joins us to discuss harnessing, web scraping, and self-hosting Python applications.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Learning Path: FastAPI: Python API Development With Light Speed</title>
      <id>https://realpython.com/learning-paths/fastapi/</id>
      <link href="https://realpython.com/learning-paths/fastapi/"/>
      <updated>2026-07-22T12:00:00+00:00</updated>
      <summary>Learn FastAPI from the ground up. Build REST APIs, serve web pages with Jinja2 templates, and create a complete URL shortener project in Python.</summary>
      <content type="html">
        &lt;p&gt;Learn FastAPI from the ground up. Build REST APIs, serve web pages with Jinja2 templates, and create a complete URL shortener project in Python.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Exploring Python&#x27;s Built-in Functions</title>
      <id>https://realpython.com/courses/exploring-pythons-built-in-functions/</id>
      <link href="https://realpython.com/courses/exploring-pythons-built-in-functions/"/>
      <updated>2026-07-21T14:00:00+00:00</updated>
      <summary>Learn Python&#x27;s built-in functions for math, data types, iterables, and I/O, and when to use each to write more Pythonic code.</summary>
      <content type="html">
        &lt;p&gt;Python&amp;rsquo;s &lt;strong&gt;built-in functions&lt;/strong&gt; are predefined functions you can use anywhere in your code without any imports. They handle common tasks across math, data type creation, iterable processing, and input and output. Knowing which ones to reach for makes your code shorter and more &lt;strong&gt;Pythonic&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this video course, you&amp;rsquo;ll:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Recognize Python&amp;rsquo;s &lt;strong&gt;built-in functions&lt;/strong&gt; and the &lt;strong&gt;built-in scope&lt;/strong&gt; they live in&lt;/li&gt;
&lt;li&gt;Use the right built-in for &lt;strong&gt;tasks&lt;/strong&gt; involving &lt;strong&gt;math&lt;/strong&gt;, &lt;strong&gt;data types&lt;/strong&gt;, &lt;strong&gt;iterables&lt;/strong&gt;, and &lt;strong&gt;I/O&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Distinguish &lt;strong&gt;real functions&lt;/strong&gt; from &lt;strong&gt;classes&lt;/strong&gt; that only look like them&lt;/li&gt;
&lt;li&gt;Apply built-ins to solve &lt;strong&gt;practical problems&lt;/strong&gt; with less code you have to write yourself&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To get the most out of this video course, you&amp;rsquo;ll need to be familiar with Python programming, including topics like working with built-in &lt;a href=&quot;https://realpython.com/python-data-types/&quot;&gt;data types&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/defining-your-own-python-function/&quot;&gt;functions&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python-classes/&quot;&gt;classes&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/primer-on-python-decorators/&quot;&gt;decorators&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python-scope-legb-rule/&quot;&gt;scopes&lt;/a&gt;, and the &lt;a href=&quot;https://realpython.com/python-import/&quot;&gt;import&lt;/a&gt; system.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast – Episode #303: Free-Threaded Python&#x27;s History &amp; uv in Production</title>
      <id>https://realpython.com/podcasts/rpp/303/</id>
      <link href="https://realpython.com/podcasts/rpp/303/"/>
      <updated>2026-07-17T12:00:00+00:00</updated>
      <summary>How many attempts have been made to remove Python&#x27;s Global Interpreter Lock (GIL)? How do they compare to the current approach? Christopher Trudeau is back on the show this week with another batch of PyCoder&#x27;s Weekly articles and projects.</summary>
      <content type="html">
        &lt;p&gt;How many attempts have been made to remove Python&#x27;s Global Interpreter Lock (GIL)? How do they compare to the current approach? Christopher Trudeau is back on the show this week with another batch of PyCoder&#x27;s Weekly articles and projects.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Understanding Mixin Classes in Python</title>
      <id>https://realpython.com/courses/understanding-mixin-classes-in-python/</id>
      <link href="https://realpython.com/courses/understanding-mixin-classes-in-python/"/>
      <updated>2026-07-14T14:00:00+00:00</updated>
      <summary>Learn how to write reusable Python mixin classes, distinguish them from abstract base classes, and steer clear of common pitfalls.</summary>
      <content type="html">
        &lt;p&gt;Mixins offer a powerful way to reuse code across multiple Python classes without forcing them into a rigid inheritance hierarchy. Instead of building deep and brittle class trees, you can use mixins to share common behaviors in a modular and flexible way. Learn when and how to implement mixin classes effectively in your Python projects.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;By the end of this video course, you&amp;rsquo;ll understand that:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Mixins&lt;/strong&gt; allow you to add isolated, reusable functionalities to classes without enforcing a strict type hierarchy.&lt;/li&gt;
&lt;li&gt;Python has &lt;strong&gt;no dedicated syntax&lt;/strong&gt; for declaring mixins. You create mixins by defining &lt;strong&gt;classes&lt;/strong&gt; with specific behaviors that other classes can inherit without forming an &lt;em&gt;is-a&lt;/em&gt; relationship.&lt;/li&gt;
&lt;li&gt;Mixins rely on &lt;strong&gt;multiple inheritance&lt;/strong&gt; to combine features from different classes, enhancing flexibility and code reuse.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Stateful mixins&lt;/strong&gt; require careful design to manage instance attributes and avoid conflicts with other classes.&lt;/li&gt;
&lt;li&gt;Python&amp;rsquo;s &lt;strong&gt;method resolution order (MRO)&lt;/strong&gt; determines the order in which classes are inherited, affecting how mixins are applied.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To get the most out of this video course, you should have a good understanding of &lt;a href=&quot;https://realpython.com/python3-object-oriented-programming/&quot;&gt;object-oriented programming (OOP)&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/solid-principles-python/&quot;&gt;SOLID principles&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/inheritance-composition-python/&quot;&gt;inheritance&lt;/a&gt;, and &lt;a href=&quot;https://realpython.com/python-classes/&quot;&gt;Python classes&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;So, what is a Python mixin, and when should you use one?&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast – Episode #302: Constructing and Judging Modern Agentic Workflows</title>
      <id>https://realpython.com/podcasts/rpp/302/</id>
      <link href="https://realpython.com/podcasts/rpp/302/"/>
      <updated>2026-07-10T12:00:00+00:00</updated>
      <summary>How can you improve your LLM agent systems through specification enrichment? What are the advantages of having an LLM act as a judge within an agent system? This week on the show, Senior IEEE Member and Quality Engineer Suneet Malhotra joins us to discuss building and evaluating agentic architecture.</summary>
      <content type="html">
        &lt;p&gt;How can you improve your LLM agent systems through specification enrichment? What are the advantages of having an LLM act as a judge within an agent system? This week on the show, Senior IEEE Member and Quality Engineer Suneet Malhotra joins us to discuss building and evaluating agentic architecture.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Testing MCP Servers With a Python MCP Client</title>
      <id>https://realpython.com/courses/testing-mcp-servers-with-a-python-mcp-client/</id>
      <link href="https://realpython.com/courses/testing-mcp-servers-with-a-python-mcp-client/"/>
      <updated>2026-07-07T14:00:00+00:00</updated>
      <summary>Learn how to build a Python MCP client that tests MCP servers from your terminal. List their tools, prompts, and resources, then call each one.</summary>
      <content type="html">
        &lt;p&gt;Building an MCP client in Python is a great way to test MCP servers directly from your terminal. In this video course, you&amp;rsquo;ll build a minimal MCP client for the command line. It can connect to an MCP server through the standard input/output (stdio) transport, list the server&amp;rsquo;s capabilities, and interact with the server&amp;rsquo;s tools, prompts, and resources directly and deterministically.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;By the end of this course, you&amp;rsquo;ll understand that:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You can build an &lt;strong&gt;MCP client&lt;/strong&gt; app for the command line using the &lt;strong&gt;MCP Python SDK&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;You can connect a client to an MCP server through the &lt;strong&gt;stdio transport&lt;/strong&gt; and point it at any server from the command line.&lt;/li&gt;
&lt;li&gt;You can list a server&amp;rsquo;s capabilities by calling &lt;code&gt;.list_tools()&lt;/code&gt;, &lt;code&gt;.list_prompts()&lt;/code&gt;, and &lt;code&gt;.list_resources()&lt;/code&gt; on a &lt;code&gt;ClientSession&lt;/code&gt; instance.&lt;/li&gt;
&lt;li&gt;You can call &lt;strong&gt;tools&lt;/strong&gt;, get &lt;strong&gt;prompts&lt;/strong&gt;, and fetch &lt;strong&gt;resources&lt;/strong&gt; from an MCP server through dedicated CLI subcommands.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Next, you&amp;rsquo;ll move through setup, client structure, server connection, and capability discovery to test MCP servers from your terminal.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Learning Path: Python Game Development</title>
      <id>https://realpython.com/learning-paths/python-game-development/</id>
      <link href="https://realpython.com/learning-paths/python-game-development/"/>
      <updated>2026-04-16T12:00:00+00:00</updated>
      <summary>Build Python games from command-line projects to 2D graphical games with turtle, Tkinter, Pygame, and Arcade.</summary>
      <content type="html">
        &lt;p&gt;Build Python games from command-line projects to 2D graphical games with turtle, Tkinter, Pygame, and Arcade.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Learning Path: LLM Application Development With Python</title>
      <id>https://realpython.com/learning-paths/llm-application-development-python/</id>
      <link href="https://realpython.com/learning-paths/llm-application-development-python/"/>
      <updated>2026-03-19T12:00:00+00:00</updated>
      <summary>Build LLM-powered applications in Python. Call model APIs, craft prompts, add retrieval-augmented generation, create AI agents, and connect via MCP.</summary>
      <content type="html">
        &lt;p&gt;Build LLM-powered applications in Python. Call model APIs, craft prompts, add retrieval-augmented generation, create AI agents, and connect via MCP.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Learning Path: Python Coding With AI</title>
      <id>https://realpython.com/learning-paths/coding-with-ai/</id>
      <link href="https://realpython.com/learning-paths/coding-with-ai/"/>
      <updated>2025-12-07T12:00:00+00:00</updated>
      <summary>Use AI coding assistants to write, review, and debug Python code faster. Choose an editor-based assistant like Cursor or a terminal-based one like Claude Code, then make it part of your daily workflow.</summary>
      <content type="html">
        &lt;p&gt;Use AI coding assistants to write, review, and debug Python code faster. Choose an editor-based assistant like Cursor or a terminal-based one like Claude Code, then make it part of your daily workflow.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Learning Path: Testing and Continuous Integration</title>
      <id>https://realpython.com/learning-paths/test-your-python-apps/</id>
      <link href="https://realpython.com/learning-paths/test-your-python-apps/"/>
      <updated>2024-11-14T12:00:00+00:00</updated>
      <summary>Learn how to test Python code with unittest, doctest, pytest, and mock objects. Set up continuous integration with GitHub Actions and Docker.</summary>
      <content type="html">
        &lt;p&gt;Learn how to test Python code with unittest, doctest, pytest, and mock objects. Set up continuous integration with GitHub Actions and Docker.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Learning Path: Ace Your Python Coding Interview</title>
      <id>https://realpython.com/learning-paths/python-interview/</id>
      <link href="https://realpython.com/learning-paths/python-interview/"/>
      <updated>2024-11-14T12:00:00+00:00</updated>
      <summary>Prepare for Python coding interviews with practice problems, tips for standing out, and resources from top PyCon talks and Python books.</summary>
      <content type="html">
        &lt;p&gt;Prepare for Python coding interviews with practice problems, tips for standing out, and resources from top PyCon talks and Python books.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Learning Path: Python Data Structures</title>
      <id>https://realpython.com/learning-paths/basic-python-data-structures/</id>
      <link href="https://realpython.com/learning-paths/basic-python-data-structures/"/>
      <updated>2024-11-14T12:00:00+00:00</updated>
      <summary>Learn Python&#x27;s built-in data structures: strings, lists, tuples, dictionaries, sets, and bytes, plus sorting, copying, and comprehensions.</summary>
      <content type="html">
        &lt;p&gt;Learn Python&#x27;s built-in data structures: strings, lists, tuples, dictionaries, sets, and bytes, plus sorting, copying, and comprehensions.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Learning Path: Important Standard Library Modules</title>
      <id>https://realpython.com/learning-paths/standard-library-modules-you-should-know/</id>
      <link href="https://realpython.com/learning-paths/standard-library-modules-you-should-know/"/>
      <updated>2024-11-14T12:00:00+00:00</updated>
      <summary>Explore Python standard library modules including math, datetime, JSON, CSV, regex, subprocess, and argparse through hands-on tutorials and courses.</summary>
      <content type="html">
        &lt;p&gt;Explore Python standard library modules including math, datetime, JSON, CSV, regex, subprocess, and argparse through hands-on tutorials and courses.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Learning Path: Perfect Your Python Development Setup</title>
      <id>https://realpython.com/learning-paths/perfect-your-python-development-setup/</id>
      <link href="https://realpython.com/learning-paths/perfect-your-python-development-setup/"/>
      <updated>2024-11-14T12:00:00+00:00</updated>
      <summary>Set up a Python development environment with VS Code, PyCharm, virtual environments, Git, pyenv, Docker, and AI coding tools like Claude Code and Cursor.</summary>
      <content type="html">
        &lt;p&gt;Set up a Python development environment with VS Code, PyCharm, virtual environments, Git, pyenv, Docker, and AI coding tools like Claude Code and Cursor.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Learning Path: Exceptions, Logging, and Debugging</title>
      <id>https://realpython.com/learning-paths/exception-handling-logging-debugging/</id>
      <link href="https://realpython.com/learning-paths/exception-handling-logging-debugging/"/>
      <updated>2024-11-14T12:00:00+00:00</updated>
      <summary>Learn Python exception handling, logging, and debugging. Work with raise, built-in exceptions, the logging module, and pdb to write reliable code.</summary>
      <content type="html">
        &lt;p&gt;Learn Python exception handling, logging, and debugging. Work with raise, built-in exceptions, the logging module, and pdb to write reliable code.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  

</feed>
