<?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-11-18T14:00:00+00:00</updated>
  <id>https://realpython.com/</id>
  <author>
    <name>Real Python</name>
  </author>

  
    <entry>
      <title>GPT-6.2 Astra Draws a Python Reading a Book</title>
      <id>https://realpython.com/ai-benchmark-gpt-6-2-astra/</id>
      <link href="https://realpython.com/ai-benchmark-gpt-6-2-astra/"/>
      <updated>2026-11-18T14:00:00+00:00</updated>
      <summary>Explore GPT-6.2 Astra&#x27;s Python code, turtle drawing, and responses to small tasks that check modern syntax, release knowledge, focused edits, and made-up functions.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;We asked &lt;strong&gt;GPT-6.2 Astra&lt;/strong&gt; to draw a python reading a book using the &lt;a href=&quot;/ref/stdlib/turtle/&quot; class=&quot;ref-link&quot;&gt;&lt;code&gt;turtle&lt;/code&gt;&lt;/a&gt; module. It’s one of five tasks in Real Python’s &lt;a href=&quot;https://realpython.com/ai-benchmark/&quot;&gt;informal model comparison&lt;/a&gt;, which explores how models handle everyday Python work. Here’s the drawing from this run:&lt;/p&gt;
&lt;figure class=&quot;js-lightbox&quot;&gt;&lt;a href=&quot;https://files.realpython.com/media/turtle.15a173eca438.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.15a173eca438.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.15a173eca438.png 196w, /cdn-cgi/image/width=261,format=auto/https://files.realpython.com/media/turtle.15a173eca438.png 261w, /cdn-cgi/image/width=392,format=auto/https://files.realpython.com/media/turtle.15a173eca438.png 392w, /cdn-cgi/image/width=784,format=auto/https://files.realpython.com/media/turtle.15a173eca438.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.2 Astra.&quot; data-asset=&quot;8361&quot;&gt;&lt;/a&gt;&lt;/figure&gt;

&lt;div class=&quot;card mb-3&quot; id=&quot;collapse_cardfd6be7&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;#collapsefd6be7&quot; aria-expanded=&quot;false&quot; aria-controls=&quot;collapsefd6be7&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_cardfd6be7&quot; id=&quot;collapsefd6be7&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.7d580fc19983.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.7d580fc19983.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.7d580fc19983.gif 196w, /cdn-cgi/image/width=261,format=auto/https://files.realpython.com/media/turtle.7d580fc19983.gif 261w, /cdn-cgi/image/width=392,format=auto/https://files.realpython.com/media/turtle.7d580fc19983.gif 392w, /cdn-cgi/image/width=784,format=auto/https://files.realpython.com/media/turtle.7d580fc19983.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.2 Astra drawing a python reading a book.&quot; data-asset=&quot;8362&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_carde0c89b&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;#collapsee0c89b&quot; aria-expanded=&quot;false&quot; aria-controls=&quot;collapsee0c89b&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_carde0c89b&quot; id=&quot;collapsee0c89b&quot;&gt;
&lt;div class=&quot;card-body&quot;&gt;
&lt;p&gt;We use the same prompts and no system prompt for each model. The results come from the returned code and replies. These informal tests explore a few habits that can affect your everyday Python work:&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.&lt;/td&gt;
&lt;td&gt;Which features it uses, such as &lt;code&gt;list[str]&lt;/code&gt;, &lt;code&gt;tomllib&lt;/code&gt;, and &lt;code&gt;Path.walk()&lt;/code&gt;. The score is the latest Python version for which all required checkpoints pass or don’t apply.&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;Latest Python version reported&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Which Python release is the newest?&lt;/td&gt;
&lt;td&gt;Whether its answer is up to date. This doesn’t establish its training cutoff.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Unrelated edits&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Add an &lt;code&gt;--ext&lt;/code&gt; option to a 50-line script.&lt;/td&gt;
&lt;td&gt;The script works but has ten spots that are easy to tidy up, like an unused import, &lt;code&gt;%&lt;/code&gt; formatting, and a typo in a comment. None of them is part of the task. We list the ones the model changed anyway. Inspect the diff to see whether those changes were useful.&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 shows the same Python feature score alongside that version’s release year. Code can use newer features and still receive a lower score.&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, Context Engineering, AI Code Review&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;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;1552 drawing commands, 97 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;Latest Python version reported&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;Unrelated edits&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;3 of 10&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;changed bare except, comment typo, range(len) loops&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;122 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.14&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;Response time&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;1 min 0 s&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;3.3k 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-gpt-6-2-astra/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/ai-benchmark-gpt-6-2-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>GPT-6.2 Sol Draws a Python Reading a Book</title>
      <id>https://realpython.com/ai-benchmark-gpt-6-2-sol/</id>
      <link href="https://realpython.com/ai-benchmark-gpt-6-2-sol/"/>
      <updated>2026-11-18T14:00:00+00:00</updated>
      <summary>Explore GPT-6.2 Sol&#x27;s Python code, turtle drawing, and responses to small tasks that check modern syntax, release knowledge, focused edits, and made-up functions.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;We asked &lt;strong&gt;GPT-6.2 Sol&lt;/strong&gt; to draw a python reading a book using the &lt;a href=&quot;/ref/stdlib/turtle/&quot; class=&quot;ref-link&quot;&gt;&lt;code&gt;turtle&lt;/code&gt;&lt;/a&gt; module. It’s one of five tasks in Real Python’s &lt;a href=&quot;https://realpython.com/ai-benchmark/&quot;&gt;informal model comparison&lt;/a&gt;, which explores how models handle everyday Python work. Here’s the drawing from this run:&lt;/p&gt;
&lt;figure class=&quot;js-lightbox&quot;&gt;&lt;a href=&quot;https://files.realpython.com/media/turtle.35f4dc313e4b.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.35f4dc313e4b.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.35f4dc313e4b.png 196w, /cdn-cgi/image/width=261,format=auto/https://files.realpython.com/media/turtle.35f4dc313e4b.png 261w, /cdn-cgi/image/width=392,format=auto/https://files.realpython.com/media/turtle.35f4dc313e4b.png 392w, /cdn-cgi/image/width=784,format=auto/https://files.realpython.com/media/turtle.35f4dc313e4b.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.2 Sol.&quot; data-asset=&quot;8365&quot;&gt;&lt;/a&gt;&lt;/figure&gt;

&lt;div class=&quot;card mb-3&quot; id=&quot;collapse_card841ba2&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;#collapse841ba2&quot; aria-expanded=&quot;false&quot; aria-controls=&quot;collapse841ba2&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_card841ba2&quot; id=&quot;collapse841ba2&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.2175e19ef2e8.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.2175e19ef2e8.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.2175e19ef2e8.gif 196w, /cdn-cgi/image/width=261,format=auto/https://files.realpython.com/media/turtle.2175e19ef2e8.gif 261w, /cdn-cgi/image/width=392,format=auto/https://files.realpython.com/media/turtle.2175e19ef2e8.gif 392w, /cdn-cgi/image/width=784,format=auto/https://files.realpython.com/media/turtle.2175e19ef2e8.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.2 Sol drawing a python reading a book.&quot; data-asset=&quot;8366&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_carde0c89b&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;#collapsee0c89b&quot; aria-expanded=&quot;false&quot; aria-controls=&quot;collapsee0c89b&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_carde0c89b&quot; id=&quot;collapsee0c89b&quot;&gt;
&lt;div class=&quot;card-body&quot;&gt;
&lt;p&gt;We use the same prompts and no system prompt for each model. The results come from the returned code and replies. These informal tests explore a few habits that can affect your everyday Python work:&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.&lt;/td&gt;
&lt;td&gt;Which features it uses, such as &lt;code&gt;list[str]&lt;/code&gt;, &lt;code&gt;tomllib&lt;/code&gt;, and &lt;code&gt;Path.walk()&lt;/code&gt;. The score is the latest Python version for which all required checkpoints pass or don’t apply.&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;Latest Python version reported&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Which Python release is the newest?&lt;/td&gt;
&lt;td&gt;Whether its answer is up to date. This doesn’t establish its training cutoff.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Unrelated edits&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Add an &lt;code&gt;--ext&lt;/code&gt; option to a 50-line script.&lt;/td&gt;
&lt;td&gt;The script works but has ten spots that are easy to tidy up, like an unused import, &lt;code&gt;%&lt;/code&gt; formatting, and a typo in a comment. None of them is part of the task. We list the ones the model changed anyway. Inspect the diff to see whether those changes were useful.&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 shows the same Python feature score alongside that version’s release year. Code can use newer features and still receive a lower score.&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, Context Engineering, AI Code Review&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;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;1316 drawing commands, 89 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;10 of 14&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;Latest Python version reported&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;3.14.6&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;Unrelated edits&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;2 of 10&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;changed comment typo, range(len) loops&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;no thinking tokens reported&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cost&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$0.03&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;Response time&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;17 s&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;3.0k 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-gpt-6-2-sol/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/ai-benchmark-gpt-6-2-sol/ »&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>Nuitka: Compile Python Into a Standalone Executable</title>
      <id>https://realpython.com/nuitka/</id>
      <link href="https://realpython.com/nuitka/"/>
      <updated>2026-11-18T14:00:00+00:00</updated>
      <summary>Learn to compile Python into a standalone executable with Nuitka. Compare standalone and onefile builds, test speed, and see when PyInstaller fits better.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Nuitka is a Python compiler that turns your code into a native executable. Its distribution modes let you package an application to run on a compatible machine without a separate Python installation. A more common way to do this is to use a bundler like PyInstaller, which ships your application together with the Python runtime and its dependencies. Nuitka instead compiles your Python code to C before building the executable.&lt;/p&gt;
&lt;p&gt;That distinction matters when you’re deciding how to distribute a Python application. Depending on your workload and build mode, Nuitka can offer performance benefits, but they come with trade-offs, including longer build times and additional compiler requirements.&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;Nuitka &lt;strong&gt;compiles&lt;/strong&gt; your Python code to C, while PyInstaller &lt;strong&gt;bundles&lt;/strong&gt; your code with the Python interpreter.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;--mode=standalone&lt;/code&gt; produces a &lt;strong&gt;folder&lt;/strong&gt;, &lt;code&gt;--mode=onefile&lt;/code&gt; produces a &lt;strong&gt;single file&lt;/strong&gt; that starts more slowly, and &lt;code&gt;--mode=app&lt;/code&gt; picks a &lt;strong&gt;platform-appropriate&lt;/strong&gt; format.&lt;/li&gt;
&lt;li&gt;Nuitka’s &lt;strong&gt;speedup&lt;/strong&gt; depends on the workload, and &lt;strong&gt;CPU-bound&lt;/strong&gt; code dominated by Python-level loops benefits the most.&lt;/li&gt;
&lt;li&gt;Nuitka is worth considering when &lt;strong&gt;your own benchmarks&lt;/strong&gt; show a speedup that justifies the &lt;strong&gt;C compiler&lt;/strong&gt; dependency and longer build times.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In this tutorial, you’ll compile a small command-line tool and see where compiling pays off. To follow along, you should be comfortable running Python scripts from the &lt;a href=&quot;https://realpython.com/terminal-commands/&quot;&gt;terminal&lt;/a&gt; and using a &lt;a href=&quot;https://realpython.com/python-virtual-environments-a-primer/&quot;&gt;virtual environment&lt;/a&gt;. You don’t need any experience with C. Nuitka drives the compiler for you.&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/nuitka-standalone-executable-code/&quot; class=&quot;alert-link&quot; data-bs-toggle=&quot;modal&quot; data-bs-target=&quot;#modal-nuitka-standalone-executable-code&quot; markdown&gt;Click here to get the free word count script and CPU benchmark&lt;/a&gt; you’ll use to compile Python into standalone executables with Nuitka and benchmark the results.&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.ef3487c363c6.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 “Nuitka: Compile Python Into a Standalone Executable” 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/nuitka/&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: #e5c6aa;&quot; alt=&quot;A person pulling a lever on a large machine that feeds a script through a hopper into a C compiler, which outputs packaged boxes stamped with the Python logo.&quot; src=&quot;https://files.realpython.com/media/Nuitka-Compile-Python-to-Standalone-Executables_Watermarked.680357d46213.jpg&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/Nuitka-Compile-Python-to-Standalone-Executables_Watermarked.680357d46213.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/Nuitka-Compile-Python-to-Standalone-Executables_Watermarked.680357d46213.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/Nuitka-Compile-Python-to-Standalone-Executables_Watermarked.680357d46213.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/Nuitka-Compile-Python-to-Standalone-Executables_Watermarked.680357d46213.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.ef3487c363c6.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/nuitka/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;Nuitka: Compile Python Into a Standalone Executable&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;Test your understanding of compiling Python with Nuitka, from standalone and onefile builds to speedups and when PyInstaller fits better.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;

&lt;h2 id=&quot;getting-started-with-nuitka&quot;&gt;Getting Started With Nuitka&lt;a class=&quot;headerlink&quot; href=&quot;#getting-started-with-nuitka&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Before you compile your first Python application, you’ll need Nuitka and a supported C compiler. This tutorial uses Python 3.13.15 for the builds shown below. The compiler setup is discussed later in this section.&lt;/p&gt;
&lt;p&gt;You can use &lt;a href=&quot;https://realpython.com/python-uv/&quot;&gt;&lt;code&gt;uv&lt;/code&gt;&lt;/a&gt; to create an isolated environment and install Nuitka. If you don’t have &lt;code&gt;uv&lt;/code&gt; installed, use the &lt;a href=&quot;/ref/stdlib/venv/&quot; class=&quot;ref-link&quot;&gt;&lt;code&gt;venv&lt;/code&gt;&lt;/a&gt; and &lt;a href=&quot;/ref/glossary/pip/&quot; class=&quot;ref-link&quot;&gt;&lt;code&gt;pip&lt;/code&gt;&lt;/a&gt; alternative described after these steps. Create the environment with &lt;code&gt;uv&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.ef3487c363c6.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;.13.15
&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.ef3487c363c6.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;Activate the environment. On macOS and Linux, run the following command:&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.ef3487c363c6.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.ef3487c363c6.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 Windows PowerShell, run the following command:&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.ef3487c363c6.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;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ps1&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.ef3487c363c6.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 the commands below, &lt;code&gt;(.venv)&lt;/code&gt; indicates an activated Python virtual environment, whether you created it with &lt;code&gt;venv&lt;/code&gt;, &lt;code&gt;uv venv&lt;/code&gt;, or another tool.&lt;/p&gt;
&lt;p&gt;Then install the version of Nuitka used for this tutorial:&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.ef3487c363c6.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;uv&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;&lt;span class=&quot;nv&quot;&gt;nuitka&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;4&lt;/span&gt;.2.1
&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.ef3487c363c6.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;Alternatively, create the environment with &lt;code&gt;python -m venv .venv&lt;/code&gt;, activate it using the appropriate command above, and install Nuitka with &lt;code&gt;python -m pip install nuitka==4.2.1&lt;/code&gt;. The rest of the tutorial uses &lt;code&gt;python -m nuitka&lt;/code&gt;, so the build commands work the same way once the environment is activated.&lt;/p&gt;
&lt;p&gt;Nuitka uses a C toolchain during compilation, and the compiler setup depends on your operating system. Check the &lt;a href=&quot;https://nuitka.net/user-documentation/user-manual.html#installation&quot;&gt;official installation documentation&lt;/a&gt; for the current platform-specific requirements.&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; On Windows, Nuitka’s downloadable MinGW64 toolchain doesn’t normally support Python 3.13 or newer. MSVC is a supported alternative, and the Windows builds in this tutorial used MSVC 14.5 with Python 3.13.15.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;For this tutorial, you’ll use a small &lt;a href=&quot;https://realpython.com/command-line-interfaces-python-argparse/&quot;&gt;command-line program&lt;/a&gt; that counts the most common words in a &lt;a href=&quot;/ref/glossary/text-file/&quot; class=&quot;ref-link&quot;&gt;text file&lt;/a&gt;. Save the following code as &lt;code&gt;wordcount.py&lt;/code&gt;:&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;wordcount.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;from&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nn&quot;&gt;argparse&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ArgumentParser&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nn&quot;&gt;collections&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Counter&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nn&quot;&gt;pathlib&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Path&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;main&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;():&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;parser&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ArgumentParser&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;description&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Show the most common words in a text file.&quot;&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;parser&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;add_argument&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;file&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;parser&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;add_argument&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;-n&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;--top&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;default&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;n&quot;&gt;args&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;parser&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;parse_args&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;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;args&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;read_text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;encoding&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;utf-8&quot;&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;lower&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;split&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;word&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;count&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Counter&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;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;most_common&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;args&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;top&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;sa&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;word&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;: &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;count&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;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;vm&quot;&gt;__name__&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;__main__&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;main&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.ef3487c363c6.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;This script reads a text file, &lt;a href=&quot;https://realpython.com/python-counter/&quot;&gt;counts word frequency&lt;/a&gt;, and prints the most common entries.&lt;/p&gt;
&lt;p&gt;Save the following text as &lt;code&gt;sample.txt&lt;/code&gt; in the same directory:&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/nuitka/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/nuitka/ »&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: Nuitka: Compile Python Into a Standalone Executable</title>
      <id>https://realpython.com/quizzes/nuitka/</id>
      <link href="https://realpython.com/quizzes/nuitka/"/>
      <updated>2026-11-18T12:00:00+00:00</updated>
      <summary>Test your understanding of compiling Python with Nuitka, from standalone and onefile builds to speedups and when PyInstaller fits better.</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/nuitka/&quot;&gt;Nuitka: Compile Python Into a Standalone Executable&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit how Nuitka compiles your code instead of
bundling it, how the standalone, onefile, and app build modes differ, which workloads
benefit from compilation, and when PyInstaller is the better fit.&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 Bindings: Calling C or C++ From Python</title>
      <id>https://realpython.com/python-bindings-overview/</id>
      <link href="https://realpython.com/python-bindings-overview/"/>
      <updated>2026-11-17T14:00:00+00:00</updated>
      <summary>Learn how Python bindings let you call C or C++ code from Python, and compare tools like ctypes, CFFI, PyBind11, and Cython.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Are you a Python developer with a &lt;a href=&quot;https://realpython.com/c-for-python-programmers/&quot;&gt;C&lt;/a&gt; or C++ library you’d like to use from Python? If so, then &lt;strong&gt;Python bindings&lt;/strong&gt; allow you to call functions and pass data from Python to &lt;a href=&quot;https://realpython.com/build-python-c-extension-module/&quot;&gt;C&lt;/a&gt; or &lt;a href=&quot;https://realpython.com/python-vs-cpp/&quot;&gt;C++&lt;/a&gt;, letting you take advantage of the strengths of both languages. Throughout this tutorial, you’ll see an overview of some of the tools you can use to create Python bindings.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this tutorial, you’ll learn about:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Why you want to &lt;strong&gt;call C or C++&lt;/strong&gt; from Python&lt;/li&gt;
&lt;li&gt;How to &lt;strong&gt;pass data&lt;/strong&gt; between C and Python&lt;/li&gt;
&lt;li&gt;What &lt;strong&gt;tools and methods&lt;/strong&gt; can help you create Python bindings&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This tutorial is aimed at intermediate Python developers. It assumes &lt;a href=&quot;https://realpython.com/learning-paths/python3-introduction/&quot;&gt;basic knowledge of Python&lt;/a&gt; and some understanding of functions and data types in C or C++. You can get all of the example code you’ll see in this tutorial 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;Get Sample Code:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/python-bindings-code/&quot; class=&quot;alert-link&quot; data-bs-toggle=&quot;modal&quot; data-bs-target=&quot;#modal-python-bindings-code&quot; markdown&gt;Click here to get the sample code you’ll use&lt;/a&gt; to learn about Python Bindings in this tutorial.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Let’s dive into looking at Python bindings!&lt;/p&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.ef3487c363c6.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 Bindings: Calling C or C++ From Python” 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/python-bindings-overview/&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: #abe0e6;&quot; alt=&quot;Python Bindings: Calling C or C++ From Python&quot; src=&quot;https://files.realpython.com/media/Python-Bindings-Overview_Watermarked.d6645cf64bca.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-Bindings-Overview_Watermarked.d6645cf64bca.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/Python-Bindings-Overview_Watermarked.d6645cf64bca.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/Python-Bindings-Overview_Watermarked.d6645cf64bca.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/Python-Bindings-Overview_Watermarked.d6645cf64bca.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.ef3487c363c6.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/python-bindings-overview/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;Python Bindings: Calling C or C++ From Python&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;Test your understanding of Python bindings, from marshaling data and managing memory to calling C and C++ with ctypes, CFFI, PyBind11, and Cython.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;

&lt;h2 id=&quot;python-bindings-overview&quot;&gt;Python Bindings Overview&lt;a class=&quot;headerlink&quot; href=&quot;#python-bindings-overview&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Before you dive into &lt;em&gt;how&lt;/em&gt; to call C from Python, it’s good to spend some time on &lt;em&gt;why&lt;/em&gt;. There are several situations where creating Python bindings to call a C library is a great idea:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;You already have a large, tested, stable library written in C++&lt;/strong&gt; that you’d like to take advantage of in Python. This may be a communication library or a library to talk to a specific piece of hardware. What it does is unimportant.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;You want to speed up a particular section of your Python code&lt;/strong&gt; by converting a critical section to C. Not only does C have faster execution speed, but it also allows you to break free from the limitations of the &lt;a href=&quot;https://realpython.com/python-gil/&quot;&gt;GIL&lt;/a&gt;, provided you’re careful.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;You want to use Python test tools&lt;/strong&gt; to do large-scale testing of their systems.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;All of the above are great reasons to learn to create Python bindings to interface with your C library.&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; Throughout this tutorial, you’ll be creating Python bindings to both C &lt;em&gt;and&lt;/em&gt; C++. Most of the general concepts apply to both languages, and so C will be used unless there’s a specific difference between the two languages. In general, each of the tools will support either C &lt;em&gt;or&lt;/em&gt; C++, but not both.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Let’s get started!&lt;/p&gt;
&lt;h3 id=&quot;marshalling-data-types&quot;&gt;Marshalling Data Types&lt;a class=&quot;headerlink&quot; href=&quot;#marshalling-data-types&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Wait! Before you start writing Python bindings, take a look at how Python and C store data and what types of issues this will cause. First, let’s define &lt;strong&gt;marshaling&lt;/strong&gt;. This concept is defined by Wikipedia as follows:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The process of transforming the memory representation of an object to a data format suitable for storage or transmission. (&lt;a href=&quot;https://en.wikipedia.org/wiki/Marshalling_(computer_science)&quot;&gt;Source&lt;/a&gt;)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;For your purposes, marshaling is what the Python bindings are doing when they prepare data to move it from Python to C or vice versa. Python bindings need to do marshaling because Python and C store data in different ways. C stores data in the most compact form in memory possible. If you use an &lt;code&gt;uint8_t&lt;/code&gt;, then it will only use 8 bits of memory total.&lt;/p&gt;
&lt;p&gt;In Python, on the other hand, everything is an &lt;a href=&quot;https://realpython.com/python-data-types/&quot;&gt;&lt;strong&gt;object&lt;/strong&gt;&lt;/a&gt;. This means that each integer uses several bytes in memory. How many will depend on which version of Python you’re running, your operating system, and other factors. This means that your Python bindings will need to convert a &lt;strong&gt;C integer&lt;/strong&gt; to a &lt;strong&gt;Python integer&lt;/strong&gt; for each integer passed across the boundary.&lt;/p&gt;
&lt;p&gt;Other data types have similar relationships between the two languages. Let’s look at each in turn:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://realpython.com/python-data-types/#integers&quot;&gt;&lt;strong&gt;Integers&lt;/strong&gt;&lt;/a&gt; store counting numbers. Python stores integers with &lt;a href=&quot;https://mortada.net/can-integer-operations-overflow-in-python.html&quot;&gt;arbitrary precision&lt;/a&gt;, meaning that you can store very, very, large numbers. C specifies the exact sizes of integers. You need to be aware of data sizes when you’re moving between languages to prevent Python integer values from overflowing C integer variables.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://realpython.com/python-data-types/#floating-point-numbers&quot;&gt;&lt;strong&gt;Floating-point numbers&lt;/strong&gt;&lt;/a&gt; are numbers with a decimal place. Python can store much larger (and much smaller) floating-point numbers than C. This means that you’ll also have to pay attention to those values to ensure they stay in range.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://realpython.com/python-complex-numbers/&quot;&gt;&lt;strong&gt;Complex numbers&lt;/strong&gt;&lt;/a&gt; are numbers with an imaginary part. While Python has built-in complex numbers, and C has complex numbers, there’s no built-in method for marshaling between them. To marshal complex numbers, you’ll need to build a &lt;code&gt;struct&lt;/code&gt; or &lt;code&gt;class&lt;/code&gt; in the C code to manage them.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://realpython.com/python-data-types/#strings&quot;&gt;&lt;strong&gt;Strings&lt;/strong&gt;&lt;/a&gt; are &lt;a href=&quot;/ref/glossary/sequence/&quot; class=&quot;ref-link&quot;&gt;sequences&lt;/a&gt; of characters. For being such a common data type, strings will prove to be rather tricky when you’re creating Python bindings. As with other data types, Python and C store strings in quite different formats. (Unlike the other data types, this is an area where C and C++ differ as well, which adds to the fun!) Each of the solutions you’ll examine have slightly different methods for dealing with strings.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://realpython.com/python-boolean/&quot;&gt;&lt;strong&gt;Boolean variables&lt;/strong&gt;&lt;/a&gt; can have only two values. Since they’re supported in C, marshaling them will prove to be fairly straightforward.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Besides data type conversions, there are other issues you’ll need to think about as you build your Python bindings. Let’s keep exploring them.&lt;/p&gt;
&lt;h3 id=&quot;understanding-mutable-and-immutable-values&quot;&gt;Understanding Mutable and Immutable Values&lt;a class=&quot;headerlink&quot; href=&quot;#understanding-mutable-and-immutable-values&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;In addition to all of these data types, you’ll also have to be aware of how Python objects can be &lt;a href=&quot;https://realpython.com/courses/immutability-python/&quot;&gt;&lt;strong&gt;mutable&lt;/strong&gt; or &lt;strong&gt;immutable&lt;/strong&gt;&lt;/a&gt;. C has a similar concept with function parameters when talking about &lt;strong&gt;pass-by-value&lt;/strong&gt; or &lt;strong&gt;pass-by-reference&lt;/strong&gt;. In C, &lt;em&gt;all&lt;/em&gt; parameters are pass-by-value. If you want to allow a function to change a variable in the caller, then you need to pass a pointer to that variable.&lt;/p&gt;
&lt;p&gt;You might be wondering if you can get around the &lt;strong&gt;&lt;a href=&quot;/ref/glossary/immutable/&quot; class=&quot;ref-link&quot;&gt;immutable&lt;/a&gt; restriction&lt;/strong&gt; by simply passing an immutable object to C using a pointer. Unless you go to ugly and non-portable extremes, &lt;a href=&quot;https://realpython.com/pointers-in-python/&quot;&gt;Python won’t give you a pointer to an object&lt;/a&gt;, so this just doesn’t work. If you want to modify a Python object in C, then you’ll need to take extra steps to achieve this. These steps will be dependent on which tools you use, as you’ll see below.&lt;/p&gt;
&lt;p&gt;So, you can add immutability to your checklist of items to consider as you create Python bindings. Your final stop on the grand tour of creating this checklist is how to handle the different ways in which Python and C deal with &lt;a href=&quot;/ref/computer-science-glossary/memory-management/&quot; class=&quot;ref-link&quot;&gt;memory management&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python-bindings-overview/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-bindings-overview/ »&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>Getting Started With Git</title>
      <id>https://realpython.com/courses/getting-started-with-git/</id>
      <link href="https://realpython.com/courses/getting-started-with-git/"/>
      <updated>2026-11-17T14:00:00+00:00</updated>
      <summary>Learn how to set up Git, create a repository, track and commit changes, undo mistakes with git reset, and ignore files using .gitignore.</summary>
      <content type="html">
        &lt;p&gt;This video course shows you how to use Git to track changes in a project using just a few core commands and save clean snapshots of your work. If you&amp;rsquo;ve ever changed a file, broken something, and wished you could undo it, version control makes that possible. Git keeps a running history of your files so you can see what changed and when.&lt;/p&gt;
&lt;p&gt;In this video course, you&amp;rsquo;ll set up Git locally and use the core workflow from the terminal to track and record changes in a Python project. By the end, you&amp;rsquo;ll have a working Git repository with a recorded commit history you can inspect and manage.&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 Python Namespace Packages</title>
      <id>https://realpython.com/quizzes/understanding-python-namespace-packages/</id>
      <link href="https://realpython.com/quizzes/understanding-python-namespace-packages/"/>
      <updated>2026-11-17T12:00:00+00:00</updated>
      <summary>Test your understanding of Python namespace packages, how they differ from regular packages, and how to build, publish, and install them with uv.</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/understanding-python-namespace-packages/&quot;&gt;Understanding Python Namespace Packages&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit what namespace packages are, how they differ
from regular packages, and why they&amp;rsquo;re a good fit for large collections of related
packages. You&amp;rsquo;ll also review how Python combines same-named folders into one namespace,
how to configure uv to build a namespace package, and how to publish its members to
TestPyPI and install them independently.&lt;/p&gt;
&lt;p&gt;This is an advanced topic, so it helps to be comfortable with Python&amp;rsquo;s
&lt;a href=&quot;https://realpython.com/python-import/&quot;&gt;import system&lt;/a&gt; and the basics of
&lt;a href=&quot;https://realpython.com/pypi-publish-python-package/&quot;&gt;packaging&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>How to Set Up a Python Project for Agentic Coding</title>
      <id>https://realpython.com/python-project-for-agentic-coding/</id>
      <link href="https://realpython.com/python-project-for-agentic-coding/"/>
      <updated>2026-11-16T14:00:00+00:00</updated>
      <summary>Learn how to set up a Python project for agentic coding, with the tests, types, and hooks that give AI coding agents fast feedback.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Modern AI agents can write functions, refactor modules, generate tests, and implement entire features from a natural language prompt. 
But their output is only as reliable as the project they’re working in. 
A Python project for agentic coding answers the questions an agent would otherwise guess at: how your project is organized and which tools to run.&lt;/p&gt;
&lt;p&gt;Fortunately, making agents more reliable doesn’t require longer prompts or a different coding agent. 
Instead, you can build a project that makes expectations explicit. 
Automated tests, &lt;a href=&quot;/ref/glossary/linter/&quot; class=&quot;ref-link&quot;&gt;linters&lt;/a&gt;, &lt;a href=&quot;/ref/glossary/static-type-checker/&quot; class=&quot;ref-link&quot;&gt;type checkers&lt;/a&gt;, configuration files, and concise project documentation create feedback loops that help both humans and AI catch mistakes early. 
The result is a development workflow that’s more predictable, regardless of which coding assistant you use.&lt;/p&gt;
&lt;p&gt;In this tutorial, you’ll build a Python project optimized for &lt;a href=&quot;/ref/ai-coding-glossary/agentic-coding/&quot; class=&quot;ref-link&quot;&gt;agentic coding&lt;/a&gt; from an empty directory. 
Along the way, you’ll configure the tools that give agents fast, executable feedback, document your project’s conventions, and organize your repository so an &lt;a href=&quot;/ref/ai-coding-glossary/agent/&quot; class=&quot;ref-link&quot;&gt;agent&lt;/a&gt; can navigate it effectively. 
Although you’ll see examples of agent-specific instruction files, the overall approach is tool agnostic and works with a wide range of agents.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Before starting this tutorial, you should:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Be familiar with running commands in the &lt;a href=&quot;https://realpython.com/terminal-commands/&quot;&gt;terminal&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Understand the basic Python &lt;a href=&quot;/ref/glossary/package/&quot; class=&quot;ref-link&quot;&gt;package&lt;/a&gt; structure&lt;/li&gt;
&lt;li&gt;Have &lt;a href=&quot;https://realpython.com/python-git-github-intro/&quot;&gt;Git&lt;/a&gt; installed and configured&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Here’s the layout you’ll end up with, including every configuration file and check that an agent relies on:&lt;/p&gt;
&lt;figure class=&quot;js-lightbox&quot;&gt;&lt;a href=&quot;https://files.realpython.com/media/Image.c3af97f42848.jpeg&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/Image.c3af97f42848.jpeg&quot; width=&quot;1402&quot; height=&quot;1267&quot; srcset=&quot;/cdn-cgi/image/width=350,format=auto/https://files.realpython.com/media/Image.c3af97f42848.jpeg 350w, /cdn-cgi/image/width=467,format=auto/https://files.realpython.com/media/Image.c3af97f42848.jpeg 467w, /cdn-cgi/image/width=701,format=auto/https://files.realpython.com/media/Image.c3af97f42848.jpeg 701w, /cdn-cgi/image/width=1402,format=auto/https://files.realpython.com/media/Image.c3af97f42848.jpeg 1402w&quot; sizes=&quot;(min-width: 1200px) 690px, (min-width: 780px) calc(-5vw + 669px), (min-width: 580px) 510px, calc(100vw - 30px)&quot; alt=&quot;File tree for AI-AGENT-PROJECT: tests/test_main.py, plus .env.example, .gitignore, main.py, pyproject.toml, README.md, uv.lock, and other config files.&quot; data-asset=&quot;7296&quot;&gt;&lt;/a&gt;&lt;figcaption class=&quot;figure-caption text-center&quot;&gt;The Final Project Structure&lt;/figcaption&gt;&lt;/figure&gt;

&lt;p&gt;Each file in that tree does one job, and you’ll add them a few at a time across the next three steps.&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/python-project-for-agentic-coding-code/&quot; class=&quot;alert-link&quot; data-bs-toggle=&quot;modal&quot; data-bs-target=&quot;#modal-python-project-for-agentic-coding-code&quot; markdown&gt;Click here to download the free starter project&lt;/a&gt; you’ll use to set up a Python project that gives AI coding agents fast, automated feedback on every change.&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.ef3487c363c6.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 “How to Set Up a Python Project for Agentic Coding” 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/python-project-for-agentic-coding/&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: #ffc973;&quot; alt=&quot;A developer stands beside a Python-powered quality-control line where documents pass through numbered inspection stages, two stamped PASS and one pulled aside as FAIL by a robot, beside a 90% gauge.&quot; src=&quot;https://files.realpython.com/media/How-to-Set-Up-a-Python-Project-for-AI-Agents_Watermarked.0cf6807584dc.jpg&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/How-to-Set-Up-a-Python-Project-for-AI-Agents_Watermarked.0cf6807584dc.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/How-to-Set-Up-a-Python-Project-for-AI-Agents_Watermarked.0cf6807584dc.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/How-to-Set-Up-a-Python-Project-for-AI-Agents_Watermarked.0cf6807584dc.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/How-to-Set-Up-a-Python-Project-for-AI-Agents_Watermarked.0cf6807584dc.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.ef3487c363c6.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/python-project-for-agentic-coding/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;How to Set Up a Python Project for Agentic Coding&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;Check how well you can set up a Python project for agentic coding, with the tests, type checks, linting, and hooks that give AI agents fast feedback.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;

&lt;div class=&quot;alert alert-primary&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong&gt;Building With AI Agents Live Course:&lt;/strong&gt; Ready to put a setup like this to work? In Real Python’s &lt;a href=&quot;https://realpython.com/workshops/building-with-agents/&quot;&gt;Building Python Projects With AI Agents&lt;/a&gt; live course, you build a real project with an agent while you write the specification and judge what comes back. Join the waitlist to hear about the next dates.&lt;/p&gt;
&lt;/div&gt;
&lt;h2 id=&quot;step-1-initialize-your-python-project&quot;&gt;Step 1: Initialize Your Python Project&lt;a class=&quot;headerlink&quot; href=&quot;#step-1-initialize-your-python-project&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://realpython.com/python-uv/&quot;&gt;&lt;code&gt;uv&lt;/code&gt;&lt;/a&gt; is a package and Python installation manager that can be used to set up new projects.
If you haven’t already installed &lt;code&gt;uv&lt;/code&gt;, then follow the &lt;a href=&quot;https://docs.astral.sh/uv/#installation&quot;&gt;installation instructions for your operating system&lt;/a&gt;.
Once it’s installed, create a new project by running:&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.ef3487c363c6.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;init&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;--package&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;ai-agent-project
&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;ai-agent-project
&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.ef3487c363c6.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 &lt;code&gt;uv init&lt;/code&gt; command creates a minimal Python project with sensible defaults. 
Depending on the version of &lt;code&gt;uv&lt;/code&gt; you’re using, the generated files may vary slightly, but you’ll typically see something similar to this:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;ai-agent-project/
│
├── src/
│   │
│   └── ai_agent_project/
│       └── __init__.py
│
├── .gitignore
├── .python-version
├── pyproject.toml
└── README.md
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This gives you a working starting point without requiring you to manually create configuration files or &lt;a href=&quot;/ref/glossary/virtual-environment/&quot; class=&quot;ref-link&quot;&gt;virtual environments&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Layout matters more here than it might first appear, and the reason has to do with how &lt;a href=&quot;/ref/ai-coding-glossary/agent/&quot; class=&quot;ref-link&quot;&gt;agents&lt;/a&gt; read a repository. Humans naturally build a mental model of a project over time.
After working in a repository, you probably know where to find files, tests, and configuration without thinking about it.&lt;/p&gt;
&lt;p&gt;AI agents don’t have that advantage.
Instead, they build a working model of your project from the files they can access. 
Each unnecessary directory, inconsistent name, or duplicated configuration increases the amount of information an agent has to process before it can make useful changes.&lt;/p&gt;
&lt;p&gt;By following a standard &lt;a href=&quot;/ref/glossary/package/&quot; class=&quot;ref-link&quot;&gt;package&lt;/a&gt; layout, like the one &lt;code&gt;uv&lt;/code&gt; provides, you are able to give an agent more context with less ambiguity.
This idea extends beyond directory structure. 
Every configuration file, automated check, and documentation file you’ll add later in this tutorial reduces uncertainty. 
Instead of repeatedly describing those expectations in &lt;a href=&quot;/ref/ai-coding-glossary/prompt/&quot; class=&quot;ref-link&quot;&gt;prompts&lt;/a&gt;, you encode those preferences directly into the project itself.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;/ref/best-practices/version-control/&quot; class=&quot;ref-link&quot;&gt;Version control&lt;/a&gt; is an essential part of modern Python development, but it also plays an important role when working with AI agents. Agents often make changes across multiple files, and &lt;a href=&quot;https://realpython.com/how-to-use-git/&quot;&gt;Git&lt;/a&gt; provides a reliable way to review, compare, or discard those changes before they’re merged.&lt;/p&gt;
&lt;p&gt;Running &lt;code&gt;uv init&lt;/code&gt; initializes both your Python project and a Git repository. 
Commit this initial state:&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.ef3487c363c6.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;git&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;add&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;.
&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;git&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;commit&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;-m&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Initial project scaffold&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.ef3487c363c6.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 snapshot is your undo button. Even when working alone, frequent commits make it much easier to recover from an incorrect implementation or compare multiple agent-generated solutions.&lt;/p&gt;
&lt;h2 id=&quot;step-2-build-an-agent-friendly-python-project-foundation&quot;&gt;Step 2: Build an Agent-Friendly Python Project Foundation&lt;a class=&quot;headerlink&quot; href=&quot;#step-2-build-an-agent-friendly-python-project-foundation&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python-project-for-agentic-coding/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-project-for-agentic-coding/ »&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: How to Set Up a Python Project for Agentic Coding</title>
      <id>https://realpython.com/quizzes/python-project-for-agentic-coding/</id>
      <link href="https://realpython.com/quizzes/python-project-for-agentic-coding/"/>
      <updated>2026-11-16T12:00:00+00:00</updated>
      <summary>Check how well you can set up a Python project for agentic coding, with the tests, type checks, linting, and hooks that give AI agents fast feedback.</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-project-for-agentic-coding/&quot;&gt;How to Set Up a Python Project for Agentic Coding&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit how Ruff, mypy, &lt;code&gt;pytest&lt;/code&gt;, and pre-commit
hooks give AI coding agents fast feedback, how to configure your tools in
&lt;code&gt;pyproject.toml&lt;/code&gt;, what belongs in an &lt;code&gt;AGENTS.md&lt;/code&gt; file, and how to keep secrets out of
your repository.&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>Scientific Python: Using SciPy for Optimization</title>
      <id>https://realpython.com/python-scipy-cluster-optimize/</id>
      <link href="https://realpython.com/python-scipy-cluster-optimize/"/>
      <updated>2026-11-15T14:00:00+00:00</updated>
      <summary>Learn how the SciPy ecosystem differs from the SciPy library, then install SciPy and use its clustering and optimization modules in Python.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;When you want to do scientific work in Python, the first library you can turn to is &lt;a href=&quot;https://scipy.org/&quot;&gt;SciPy&lt;/a&gt;. As you’ll see in this tutorial, &lt;strong&gt;SciPy&lt;/strong&gt; is not just a library, but a whole &lt;strong&gt;ecosystem&lt;/strong&gt; of libraries that work together to help you accomplish complicated scientific tasks quickly and reliably.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this tutorial, you’ll learn how to:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Find&lt;/strong&gt; information about all the things you can do with SciPy&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Install&lt;/strong&gt; SciPy on your computer&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Use&lt;/strong&gt; SciPy to cluster a dataset by several variables&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Use&lt;/strong&gt; SciPy to find the optimum of a function&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can follow along with the examples in this tutorial by downloading the source code available at 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 Sample Code:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/scipy-code/&quot; class=&quot;alert-link&quot; data-bs-toggle=&quot;modal&quot; data-bs-target=&quot;#modal-scipy-code&quot; markdown&gt;Click here to get the sample code you’ll use&lt;/a&gt; to learn about SciPy in this tutorial.&lt;/p&gt;
&lt;/div&gt;
&lt;h2 id=&quot;differentiating-scipy-the-ecosystem-and-scipy-the-library&quot;&gt;Differentiating SciPy the Ecosystem and SciPy the Library&lt;a class=&quot;headerlink&quot; href=&quot;#differentiating-scipy-the-ecosystem-and-scipy-the-library&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;When you want to use Python for scientific computing tasks, there are several libraries that you’ll probably be advised to use, including:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/tutorials/numpy/&quot;&gt;NumPy&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;SciPy&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/python-matplotlib-guide/&quot;&gt;Matplotlib&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/ipython-interactive-python-shell/&quot;&gt;IPython&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;SymPy&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/pandas-python-explore-dataset/&quot;&gt;Pandas&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Collectively, these libraries make up the &lt;a href=&quot;https://scipy.org/about/&quot;&gt;&lt;strong&gt;SciPy ecosystem&lt;/strong&gt;&lt;/a&gt; and are designed to work together. Many of them rely directly on NumPy &lt;a href=&quot;/ref/glossary/array/&quot; class=&quot;ref-link&quot;&gt;arrays&lt;/a&gt; to do computations. This tutorial expects that you have some familiarity with creating NumPy arrays and operating on them.&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 you need a quick primer or refresher on &lt;a href=&quot;https://realpython.com/tutorials/numpy/&quot;&gt;NumPy&lt;/a&gt;, then you can check out these tutorials:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/numpy-array-programming/&quot;&gt;Look Ma, No &lt;code&gt;for&lt;/code&gt; Loops: Array Programming With NumPy&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/how-to-use-numpy-arange/&quot;&gt;NumPy &lt;code&gt;arange()&lt;/code&gt;: How to Use &lt;code&gt;np.arange()&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/matlab-vs-python/#an-overview-of-basic-array-operations&quot;&gt;MATLAB vs. Python: An Overview of Basic Array Operations&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;p&gt;In this tutorial, you’ll learn about the &lt;strong&gt;SciPy library&lt;/strong&gt;, one of the core components of the SciPy ecosystem. The SciPy library is the fundamental library for scientific computing in Python. It provides many efficient and user-friendly interfaces for tasks such as numerical integration, optimization, signal processing, &lt;a href=&quot;https://realpython.com/python-scipy-linalg/&quot;&gt;linear algebra&lt;/a&gt;, and more.&lt;/p&gt;
&lt;h2 id=&quot;understanding-scipy-modules&quot;&gt;Understanding SciPy Modules&lt;a class=&quot;headerlink&quot; href=&quot;#understanding-scipy-modules&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The SciPy library is composed of a number of &lt;strong&gt;&lt;a href=&quot;/ref/glossary/module/&quot; class=&quot;ref-link&quot;&gt;modules&lt;/a&gt;&lt;/strong&gt; that separate the library into distinct functional units. If you want to learn about the different modules that SciPy includes, then you can run &lt;code&gt;help()&lt;/code&gt; on &lt;code&gt;scipy&lt;/code&gt;, as shown below:&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.ef3487c363c6.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;scipy&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;help&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;scipy&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.ef3487c363c6.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;This produces some help output for the entire SciPy library, a portion of which is shown below:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;text&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--grey&quot;&gt;
    &lt;span class=&quot;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Language: &lt;/span&gt;Text&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;Subpackages
-----------
::

 cluster                      --- Vector Quantization / Kmeans
 fft                          --- Discrete Fourier transforms
 fftpack                      --- Legacy discrete Fourier transforms
 integrate                    --- Integration routines
...
&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.ef3487c363c6.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;This code block shows the &lt;code&gt;Subpackages&lt;/code&gt; portion of the help output, which is a list of all of the available modules within SciPy that you can use for calculations.&lt;/p&gt;
&lt;p&gt;Before SciPy 1.9, you had to explicitly import a subpackage before you could use it. Newer versions load subpackages lazily as soon as you access them, but it’s still good practice to import the module that you want to use &lt;strong&gt;specifically&lt;/strong&gt;. You’ll see some examples of this a little later in the tutorial, and guidelines for importing libraries from SciPy are shown in the &lt;a href=&quot;https://docs.scipy.org/doc/scipy/reference/index.html#guidelines-for-importing-functions-from-scipy&quot;&gt;SciPy documentation&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Once you decide which module you want to use, you can check out the SciPy &lt;a href=&quot;https://docs.scipy.org/doc/scipy/reference/#api-reference&quot;&gt;API reference&lt;/a&gt;, which contains all of the details on each module in SciPy. If you’re looking for something with a little more exposition, then the &lt;a href=&quot;https://lectures.scientific-python.org/intro/scipy/index.html&quot;&gt;Scientific Python Lectures on SciPy&lt;/a&gt; are a great resource to go in-depth on many of the SciPy modules.&lt;/p&gt;
&lt;p&gt;Later in this tutorial, you’ll learn about &lt;code&gt;cluster&lt;/code&gt; and &lt;code&gt;optimize&lt;/code&gt;, which are two of the modules in the SciPy library. But first, you’ll need to install SciPy on your computer.&lt;/p&gt;
&lt;h2 id=&quot;installing-scipy-on-your-computer&quot;&gt;Installing SciPy on Your Computer&lt;a class=&quot;headerlink&quot; href=&quot;#installing-scipy-on-your-computer&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;As with most &lt;a href=&quot;https://realpython.com/python-modules-packages/&quot;&gt;Python packages&lt;/a&gt;, there are two main ways to install SciPy on your computer:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/python-windows-machine-learning-setup/&quot;&gt;Anaconda&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/what-is-pip/&quot;&gt;PyPI and &lt;code&gt;pip&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Here, you’ll learn how to use both of these approaches to install the library. SciPy’s only direct &lt;a href=&quot;/ref/glossary/dependency/&quot; class=&quot;ref-link&quot;&gt;dependency&lt;/a&gt; is the NumPy &lt;a href=&quot;/ref/glossary/package/&quot; class=&quot;ref-link&quot;&gt;package&lt;/a&gt;. Either installation method will automatically install NumPy in addition to SciPy, if necessary.&lt;/p&gt;
&lt;h3 id=&quot;anaconda&quot;&gt;Anaconda&lt;a class=&quot;headerlink&quot; href=&quot;#anaconda&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/python-scipy-cluster-optimize/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-scipy-cluster-optimize/ »&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 Do a Binary Search in Python</title>
      <id>https://realpython.com/binary-search-python/</id>
      <link href="https://realpython.com/binary-search-python/"/>
      <updated>2026-11-14T14:00:00+00:00</updated>
      <summary>Use the bisect module to do a binary search in Python, then implement this classic algorithm yourself, both iteratively and recursively.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;/ref/computer-science-glossary/binary-search/&quot; class=&quot;ref-link&quot;&gt;Binary search&lt;/a&gt;&lt;/strong&gt; is a classic &lt;a href=&quot;/ref/computer-science-glossary/algorithm/&quot; class=&quot;ref-link&quot;&gt;algorithm&lt;/a&gt; in computer science. It often comes up in programming contests and &lt;a href=&quot;https://realpython.com/python-coding-interview-tips/&quot;&gt;technical interviews&lt;/a&gt;. Implementing binary search turns out to be a challenging task, even when you understand the concept. Unless you’re curious or have a specific assignment, you should always leverage existing libraries to do a binary search in Python or any other language.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this tutorial, you’ll learn how to:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Use the &lt;strong&gt;&lt;code&gt;bisect&lt;/code&gt;&lt;/strong&gt; &lt;a href=&quot;/ref/glossary/module/&quot; class=&quot;ref-link&quot;&gt;module&lt;/a&gt; to do a binary search in Python&lt;/li&gt;
&lt;li&gt;Implement a binary search in Python both &lt;strong&gt;recursively&lt;/strong&gt; and &lt;strong&gt;iteratively&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Recognize and fix &lt;strong&gt;defects&lt;/strong&gt; in a binary search Python implementation&lt;/li&gt;
&lt;li&gt;Analyze the &lt;strong&gt;time-space complexity&lt;/strong&gt; of the binary search algorithm&lt;/li&gt;
&lt;li&gt;Search even &lt;strong&gt;faster&lt;/strong&gt; than binary search&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This tutorial assumes you’re a student or an &lt;a href=&quot;https://realpython.com/tutorials/intermediate/&quot;&gt;&lt;strong&gt;intermediate programmer&lt;/strong&gt;&lt;/a&gt; with an interest in algorithms and &lt;a href=&quot;https://realpython.com/python-data-structures/&quot;&gt;data structures&lt;/a&gt;. At the very least, you should be familiar with Python’s &lt;a href=&quot;https://realpython.com/python-data-types/&quot;&gt;built-in data types&lt;/a&gt;, such as &lt;a href=&quot;https://realpython.com/python-lists-tuples/&quot;&gt;lists and tuples&lt;/a&gt;. In addition, some familiarity with &lt;a href=&quot;https://realpython.com/python-recursion/&quot;&gt;recursion&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/lessons/classes-python/&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-lambda/&quot;&gt;lambdas&lt;/a&gt; will help you better understand the concepts you’ll see in this tutorial.&lt;/p&gt;
&lt;p&gt;Below you’ll find a link to the sample code you’ll see throughout this tutorial, which requires Python 3.7 or later to run:&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown&gt;Get Sample Code:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/binary-search-python-code/&quot; class=&quot;alert-link&quot; data-bs-toggle=&quot;modal&quot; data-bs-target=&quot;#modal-binary-search-python-code&quot; markdown&gt;Click here to get the sample code you’ll use&lt;/a&gt; to learn about binary search in Python in this tutorial.&lt;/p&gt;
&lt;/div&gt;
&lt;h2 id=&quot;benchmarking&quot;&gt;Benchmarking&lt;a class=&quot;headerlink&quot; href=&quot;#benchmarking&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;In the next section of this tutorial, you’ll be using a subset of the &lt;a href=&quot;https://www.imdb.com/&quot;&gt;Internet Movie Database (IMDb)&lt;/a&gt; to benchmark the performance of a few search algorithms. This dataset is free of charge for personal and non-commercial use. It’s distributed as a bunch of compressed &lt;a href=&quot;https://en.wikipedia.org/wiki/Tab-separated_values&quot;&gt;tab-separated values (TSV)&lt;/a&gt; files, which get daily updates.&lt;/p&gt;
&lt;p&gt;To make your life easier, you can use a Python script included in the sample code. It’ll automatically fetch the relevant file from IMDb, decompress it, and extract the interesting pieces:&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.ef3487c363c6.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;download_imdb.py
&lt;span class=&quot;go&quot;&gt;Fetching data from IMDb...&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;Created &quot;names.txt&quot; and &quot;sorted_names.txt&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.ef3487c363c6.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;Be warned that this will download and extract approximately 600 MB of data, as well as produce two additional files, which are about half of that in size. The download, as well as the processing of this data, might take a minute or two to complete.&lt;/p&gt;
&lt;h3 id=&quot;download-imdb&quot;&gt;Download IMDb&lt;a class=&quot;headerlink&quot; href=&quot;#download-imdb&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;To manually obtain the data, navigate your web browser to &lt;a href=&quot;https://datasets.imdbws.com/&quot;&gt;https://datasets.imdbws.com/&lt;/a&gt; and grab the file called &lt;code&gt;name.basics.tsv.gz&lt;/code&gt;, which contains the records of actors, directors, writers, and so on. When you decompress the file, you’ll see the following content:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;text&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--grey&quot;&gt;
    &lt;span class=&quot;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Language: &lt;/span&gt;Text&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;nconst     primaryName      birthYear  deathYear  (...)
nm0000001  Fred Astaire     1899       1987       (...)
nm0000002  Lauren Bacall    1924       2014       (...)
nm0000003  Brigitte Bardot  1934       \N         (...)
nm0000004  John Belushi     1949       1982       (...)
&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.ef3487c363c6.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;It has a &lt;strong&gt;header&lt;/strong&gt; with the column names in the first line, followed by &lt;strong&gt;data records&lt;/strong&gt; in each of the subsequent lines. Each record contains a unique identifier, a full name, birth year, and a few other attributes. These are all delimited with a tab character.&lt;/p&gt;
&lt;p&gt;There are millions of records, so don’t try to open the file with a regular text editor to avoid crashing your computer. Even specialized software such as spreadsheets can have problems opening it. Instead, you might take advantage of the high-performance data grid viewer included in &lt;a href=&quot;https://realpython.com/using-jupyterlab/&quot;&gt;JupyterLab&lt;/a&gt;, for example.&lt;/p&gt;
&lt;h3 id=&quot;read-tab-separated-values&quot;&gt;Read Tab-Separated Values&lt;a class=&quot;headerlink&quot; href=&quot;#read-tab-separated-values&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;There are a few ways to parse a TSV file. For example, you can read it with &lt;a href=&quot;https://realpython.com/lessons/reading-csvs-pandas/&quot;&gt;Pandas&lt;/a&gt;, use a dedicated application, or leverage a few command-line tools. However, it’s recommended that you use the hassle-free Python script included in the sample code.&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; As a rule of thumb, you should avoid parsing files manually because you might overlook &lt;strong&gt;edge cases&lt;/strong&gt;. For example, in one of the fields, the delimiting tab character could be used literally inside quotation marks, which would break the number of columns. Whenever possible, try to find a relevant module in the standard library or a trustworthy third-party one.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Ultimately, you want to end up with two text files at your disposal:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;names.txt&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;sorted_names.txt&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;One will contain a &lt;a href=&quot;https://realpython.com/python-list/&quot;&gt;list&lt;/a&gt; of names obtained by cutting out the second column from the original TSV file:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;text&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--grey&quot;&gt;
    &lt;span class=&quot;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Language: &lt;/span&gt;Text&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;Fred Astaire
Lauren Bacall
Brigitte Bardot
John Belushi
Ingmar Bergman
...
&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.ef3487c363c6.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 second one will be the sorted version of this.&lt;/p&gt;
&lt;p&gt;Once both files are ready, you can load them into Python using this function:&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/binary-search-python/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/binary-search-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>Anthropic and Google Make Their Best AI Models Cheaper</title>
      <id>https://realpython.com/ai-news-weekly-2026-11-13/</id>
      <link href="https://realpython.com/ai-news-weekly-2026-11-13/"/>
      <updated>2026-11-13T14:00:00+00:00</updated>
      <summary>Real Python&#x27;s weekly AI news for November 7–13, 2026, explained in plain language: Cheaper Claude, Google&#x27;s Strongest Gemini, and a Faster Gemini.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;&lt;em&gt;Real Python AI News · Weekly edition · The week of November 7–13, 2026&lt;/em&gt;&lt;/p&gt;
&lt;div class=&quot;card border rounded my-4&quot;&gt;&lt;div class=&quot;card-body&quot;&gt;&lt;div class=&quot;row align-items-center g-3&quot;&gt;&lt;div class=&quot;col-md-6&quot;&gt;&lt;figure class=&quot;&quot;&gt;&lt;img loading=&quot;lazy&quot; class=&quot;img-fluid &quot; src=&quot;https://files.realpython.com/media/email.593b33f65c83.png&quot; width=&quot;2700&quot; height=&quot;2040&quot; srcset=&quot;/cdn-cgi/image/width=675,format=auto/https://files.realpython.com/media/email.593b33f65c83.png 675w, /cdn-cgi/image/width=900,format=auto/https://files.realpython.com/media/email.593b33f65c83.png 900w, /cdn-cgi/image/width=1350,format=auto/https://files.realpython.com/media/email.593b33f65c83.png 1350w, /cdn-cgi/image/width=2700,format=auto/https://files.realpython.com/media/email.593b33f65c83.png 2700w&quot; sizes=&quot;(min-width: 1200px) 690px, (min-width: 780px) calc(-5vw + 669px), (min-width: 580px) 510px, calc(100vw - 30px)&quot; alt=&quot;An email from Real Python titled Here Are Your AI News, What Changed and Why It Matters, with lavender newsletter artwork and a What&#x27;s New in AI heading.&quot; data-asset=&quot;7653&quot;&gt;&lt;/figure&gt;
&lt;/div&gt;&lt;div class=&quot;col-md-6&quot;&gt;&lt;p class=&quot;h4 mb-2&quot;&gt;Stop Falling Behind on AI. Catch Up in Five Minutes.&lt;/p&gt;&lt;p class=&quot;mb-3&quot;&gt;New models, new prices, new agent tools, all the time. Our new AI newsletter gives you the handful of stories you actually need as a developer. Free, straight from the Real Python team.&lt;/p&gt;


  &lt;div class=&quot;survey-form__modal&quot;&gt;




&lt;modal-button data-headline=&quot;Stop Falling Behind on AI. Catch Up in Five Minutes.&quot; data-no-footer=&quot;true&quot; data-large=&quot;true&quot; style=&quot;display:inline&quot;&gt;
  &lt;button type=&quot;button&quot; class=&quot;btn btn-primary&quot; data-modal-trigger&gt;
    Get the free roundup
  &lt;/button&gt;
  &lt;template data-modal-content&gt;



&lt;survey-form class=&quot;survey-form d-block&quot; data-slug=&quot;ai-newsletter&quot; data-endpoint=&quot;/api/v1/surveys/ai-newsletter/submissions/&quot; data-draft-endpoint=&quot;/api/v1/surveys/ai-newsletter/draft/&quot; data-view-endpoint=&quot;/api/v1/surveys/ai-newsletter/view/&quot; data-pages=&quot;1&quot; data-definition-hash=&quot;48cf1caeda6e874d&quot; data-captcha=&quot;auto&quot; data-turnstile-sitekey=&quot;0x4AAAAAAAQQUCLRXBi8NnUh&quot; data-surface=&quot;modal&quot; data-authenticated=&quot;0&quot; data-save-progress=&quot;1&quot; data-preview=&quot;0&quot;&gt;
  &lt;template data-resume-notice&gt;
    &lt;div class=&quot;alert alert-light border d-flex justify-content-between align-items-center py-2 mb-4&quot; role=&quot;status&quot;&gt;
      &lt;span class=&quot;text-body-secondary&quot;&gt;&lt;span class=&quot;icon baseline me-1&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.ef3487c363c6.svg#solid--check&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;We saved your progress from earlier.&lt;/span&gt;
      &lt;button type=&quot;button&quot; class=&quot;btn btn-link btn-sm p-0&quot; data-action=&quot;start-over&quot;&gt;Start over&lt;/button&gt;
    &lt;/div&gt;
  &lt;/template&gt;
  &lt;div data-form-area&gt;

    &lt;form novalidate data-survey-form autocomplete=&quot;on&quot;&gt;
      &lt;div class=&quot;visually-hidden&quot; aria-hidden=&quot;true&quot;&gt;
        &lt;label for=&quot;ai-newsletter-hp&quot;&gt;Leave this field empty&lt;/label&gt;
        &lt;input type=&quot;text&quot; name=&quot;hp&quot; id=&quot;ai-newsletter-hp&quot; tabindex=&quot;-1&quot; autocomplete=&quot;off&quot;&gt;
      &lt;/div&gt;

        &lt;fieldset data-page=&quot;0&quot; data-next-label=&quot;Next&quot; tabindex=&quot;-1&quot;&gt;


              &lt;div class=&quot;survey-form__markdown article-body mb-4&quot;&gt;&lt;figure class=&quot;&quot;&gt;&lt;img loading=&quot;lazy&quot; class=&quot;img-fluid rounded&quot; src=&quot;https://files.realpython.com/media/preview.4b4dadd03735.png&quot; width=&quot;2000&quot; height=&quot;834&quot; srcset=&quot;/cdn-cgi/image/width=500,format=auto/https://files.realpython.com/media/preview.4b4dadd03735.png 500w, /cdn-cgi/image/width=666,format=auto/https://files.realpython.com/media/preview.4b4dadd03735.png 666w, /cdn-cgi/image/width=1000,format=auto/https://files.realpython.com/media/preview.4b4dadd03735.png 1000w, /cdn-cgi/image/width=2000,format=auto/https://files.realpython.com/media/preview.4b4dadd03735.png 2000w&quot; sizes=&quot;(min-width: 1200px) 690px, (min-width: 780px) calc(-5vw + 669px), (min-width: 580px) 510px, calc(100vw - 30px)&quot; alt=&quot;An email from Real Python titled Here Are Your AI News, What Changed and Why It Matters, with lavender newsletter artwork and badges reading New issue in your inbox and In every issue.&quot; data-asset=&quot;7652&quot;&gt;&lt;/figure&gt;

&lt;p&gt;New models, new prices, new agent tools, all the time. Our new AI newsletter gives you the handful of stories you actually need as a developer.&lt;/p&gt;&lt;/div&gt;






&lt;div class=&quot;survey-form__field&quot; data-field=&quot;frequency&quot; data-field-type=&quot;checkbox&quot;&gt;

    &lt;fieldset data-required&gt;
      &lt;legend class=&quot;form-label fw-bold&quot;&gt;How often should it land in your inbox? Pick as many as you like.&lt;/legend&gt;


        &lt;div class=&quot;survey-form__pills&quot; data-pills&gt;

            &lt;span data-option data-value=&quot;daily&quot;&gt;
              &lt;input type=&quot;checkbox&quot; class=&quot;btn-check&quot; name=&quot;frequency&quot; id=&quot;survey-ai-newsletter-1668ca-frequency-daily&quot; value=&quot;daily&quot;&gt;
              &lt;label class=&quot;btn btn-outline-dark rounded-pill survey-form__pill&quot; for=&quot;survey-ai-newsletter-1668ca-frequency-daily&quot;&gt;☀️ Daily&lt;/label&gt;
            &lt;/span&gt;

            &lt;span data-option data-value=&quot;weekly&quot;&gt;
              &lt;input type=&quot;checkbox&quot; class=&quot;btn-check&quot; name=&quot;frequency&quot; id=&quot;survey-ai-newsletter-1668ca-frequency-weekly&quot; value=&quot;weekly&quot;&gt;
              &lt;label class=&quot;btn btn-outline-dark rounded-pill survey-form__pill&quot; for=&quot;survey-ai-newsletter-1668ca-frequency-weekly&quot;&gt;📬 Weekly&lt;/label&gt;
            &lt;/span&gt;

            &lt;span data-option data-value=&quot;monthly&quot;&gt;
              &lt;input type=&quot;checkbox&quot; class=&quot;btn-check&quot; name=&quot;frequency&quot; id=&quot;survey-ai-newsletter-1668ca-frequency-monthly&quot; value=&quot;monthly&quot;&gt;
              &lt;label class=&quot;btn btn-outline-dark rounded-pill survey-form__pill&quot; for=&quot;survey-ai-newsletter-1668ca-frequency-monthly&quot;&gt;🗓️ Monthly&lt;/label&gt;
            &lt;/span&gt;

        &lt;/div&gt;


    &lt;/fieldset&gt;

  &lt;div class=&quot;invalid-feedback d-block&quot; id=&quot;survey-ai-newsletter-1668ca-frequency-error&quot; data-error-for=&quot;frequency&quot; hidden&gt;&lt;/div&gt;
&lt;/div&gt;








&lt;div class=&quot;survey-form__field&quot; data-field=&quot;email&quot; data-field-type=&quot;email&quot;&gt;

    &lt;label class=&quot;form-label fw-bold&quot; for=&quot;survey-ai-newsletter-1668ca-email&quot;&gt;Your email address&lt;/label&gt;

    &lt;input type=&quot;email&quot; name=&quot;email&quot; class=&quot;form-control&quot; placeholder=&quot;you@example.com&quot; autocomplete=&quot;email&quot; maxlength=&quot;254&quot; id=&quot;survey-ai-newsletter-1668ca-email&quot; required&gt;

  &lt;div class=&quot;invalid-feedback d-block&quot; id=&quot;survey-ai-newsletter-1668ca-email-error&quot; data-error-for=&quot;email&quot; hidden&gt;&lt;/div&gt;
&lt;/div&gt;





              &lt;div class=&quot;survey-form__markdown article-body mb-4&quot;&gt;&lt;p&gt;&lt;strong&gt;Free, straight from the Real Python team. Unsubscribe anytime.&lt;/strong&gt;&lt;/p&gt;&lt;/div&gt;






        &lt;/fieldset&gt;

      &lt;div class=&quot;alert alert-danger py-2&quot; data-form-error role=&quot;alert&quot; hidden&gt;&lt;/div&gt;
      &lt;div data-turnstile class=&quot;survey-form__turnstile&quot;&gt;&lt;/div&gt;
      &lt;div class=&quot;d-flex align-items-center flex-wrap gap-3 mt-4&quot;&gt;
        &lt;button type=&quot;button&quot; class=&quot;btn btn-link ps-0&quot; data-action=&quot;back&quot; hidden&gt;« Back&lt;/button&gt;
        &lt;button type=&quot;button&quot; class=&quot;btn btn-dark px-4&quot; data-action=&quot;next&quot; hidden&gt;Next&lt;/button&gt;
        &lt;button type=&quot;submit&quot; class=&quot;btn btn-primary px-4&quot; data-action=&quot;submit&quot;&gt;Sign Me Up&lt;/button&gt;
        &lt;span class=&quot;small text-body-secondary&quot; data-saved-indicator hidden&gt;&lt;span class=&quot;icon baseline text-success me-1&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.ef3487c363c6.svg#solid--check&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;Saved&lt;/span&gt;
      &lt;/div&gt;
    &lt;/form&gt;
  &lt;/div&gt;
  &lt;noscript&gt;
    &lt;div class=&quot;alert alert-warning mt-3&quot;&gt;This form needs JavaScript to work.&lt;/div&gt;
  &lt;/noscript&gt;
&lt;/survey-form&gt;

  &lt;/template&gt;
&lt;/modal-button&gt;

  &lt;/div&gt;

&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The big AI companies spent the week making their best models cheaper and faster to use. Here’s what changed, explained in plain language, plus two cases where AI produced work that a computer could check line by line.&lt;/p&gt;
&lt;h2 id=&quot;anthropics-top-claude-models-now-cost-less-and-answer-faster&quot;&gt;Anthropic’s Top Claude Models Now Cost Less and Answer Faster&lt;a class=&quot;headerlink&quot; href=&quot;#anthropics-top-claude-models-now-cost-less-and-answer-faster&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;figure class=&quot;js-lightbox&quot;&gt;&lt;a href=&quot;https://files.realpython.com/media/s-claude-fable-5-2-claude-mythos-framed.3cb0f1bfd05d.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/s-claude-fable-5-2-claude-mythos-framed.3cb0f1bfd05d.png&quot; width=&quot;2560&quot; height=&quot;1120&quot; srcset=&quot;/cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/s-claude-fable-5-2-claude-mythos-framed.3cb0f1bfd05d.png 640w, /cdn-cgi/image/width=853,format=auto/https://files.realpython.com/media/s-claude-fable-5-2-claude-mythos-framed.3cb0f1bfd05d.png 853w, /cdn-cgi/image/width=1280,format=auto/https://files.realpython.com/media/s-claude-fable-5-2-claude-mythos-framed.3cb0f1bfd05d.png 1280w, /cdn-cgi/image/width=2560,format=auto/https://files.realpython.com/media/s-claude-fable-5-2-claude-mythos-framed.3cb0f1bfd05d.png 2560w&quot; sizes=&quot;(min-width: 1200px) 690px, (min-width: 780px) calc(-5vw + 669px), (min-width: 580px) 510px, calc(100vw - 30px)&quot; alt=&quot;Screenshot of the source page: Introducing Claude Fable 5.2 and Claude Mythos 5.2 \ Anthropic&quot; data-asset=&quot;8225&quot;&gt;&lt;/a&gt;&lt;/figure&gt;

&lt;p&gt;&lt;a href=&quot;/ref/ai-coding-tools/claude/&quot; class=&quot;ref-link&quot;&gt;Claude&lt;/a&gt; Fable 5.2 and &lt;a href=&quot;https://www.anthropic.com/claude-fable-and-mythos-5-2&quot;&gt;Claude Mythos 5.2&lt;/a&gt; are new versions of Anthropic’s most capable AI &lt;em&gt;models&lt;/em&gt;, the trained programs inside the Claude assistant. Anthropic says the two share one underlying model. Fable has strong safeguards around cybersecurity and biology, so anyone can use it. Mythos has fewer and is open only to vetted organizations.&lt;/p&gt;
&lt;p&gt;Developers connect their apps to Claude through an &lt;a href=&quot;/ref/glossary/api/&quot; class=&quot;ref-link&quot;&gt;API&lt;/a&gt;, a way for one piece of software to talk to another. They pay by the &lt;a href=&quot;/ref/ai-coding-glossary/token/&quot; class=&quot;ref-link&quot;&gt;token&lt;/a&gt;, a small piece of text such as a short word. Sending a million tokens costs $8, and a million tokens of replies cost $40. Anthropic says replies come up to 30 percent faster than with version 5.1. An optional fast mode costs double, $16 and $80, and Anthropic says it writes up to 2.5 times faster.&lt;/p&gt;
&lt;p&gt;On BenchCAD 2.1, a hardware engineering test, Anthropic reports a score of 83.5 for Fable 5.2 at its highest effort setting, up from 44.4 for Fable 5.1. These are Anthropic’s own measurements.&lt;/p&gt;
&lt;div class=&quot;container bg-body-tertiary rounded border p-3 my-4&quot;&gt;
&lt;div class=&quot;row align-items-center&quot;&gt;
&lt;div class=&quot;col-3 col-md-2&quot;&gt;
&lt;figure class=&quot;&quot;&gt;&lt;img loading=&quot;lazy&quot; class=&quot;img-fluid rounded-circle&quot; src=&quot;https://files.realpython.com/media/pacsany.19bcf16f5a00.jpg&quot; width=&quot;1920&quot; height=&quot;1920&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/pacsany.19bcf16f5a00.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/pacsany.19bcf16f5a00.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/pacsany.19bcf16f5a00.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/pacsany.19bcf16f5a00.jpg 1920w&quot; sizes=&quot;(min-width: 1200px) 690px, (min-width: 780px) calc(-5vw + 669px), (min-width: 580px) 510px, calc(100vw - 30px)&quot; alt=&quot;Philipp Acsany&quot; data-asset=&quot;3678&quot;&gt;&lt;/figure&gt;
&lt;/div&gt;
&lt;div class=&quot;col&quot;&gt;
&lt;p class=&quot;mb-2&quot;&gt;“A cheaper token doesn’t always mean a cheaper job. A model that thinks longer or writes more uses more tokens, so a finished task can still cost more. Anthropic says Fable 5.2 needs fewer tokens per task than 5.1 at its default setting. Businesses find out the real cost by trying it on their own work.”&lt;/p&gt;
&lt;p class=&quot;small mb-0&quot;&gt;&lt;strong&gt;— Philipp Acsany&lt;/strong&gt;, Real Python&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&quot;googles-most-capable-ai-model-gemini-4-carbon-opens-to-programmers&quot;&gt;Google’s Most Capable AI Model, Gemini 4 Carbon, Opens to Programmers&lt;a class=&quot;headerlink&quot; href=&quot;#googles-most-capable-ai-model-gemini-4-carbon-opens-to-programmers&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;figure class=&quot;js-lightbox&quot;&gt;&lt;a href=&quot;https://files.realpython.com/media/s-gemini-4-carbon-framed.89959526c2b9.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/s-gemini-4-carbon-framed.89959526c2b9.png&quot; width=&quot;2560&quot; height=&quot;1120&quot; srcset=&quot;/cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/s-gemini-4-carbon-framed.89959526c2b9.png 640w, /cdn-cgi/image/width=853,format=auto/https://files.realpython.com/media/s-gemini-4-carbon-framed.89959526c2b9.png 853w, /cdn-cgi/image/width=1280,format=auto/https://files.realpython.com/media/s-gemini-4-carbon-framed.89959526c2b9.png 1280w, /cdn-cgi/image/width=2560,format=auto/https://files.realpython.com/media/s-gemini-4-carbon-framed.89959526c2b9.png 2560w&quot; sizes=&quot;(min-width: 1200px) 690px, (min-width: 780px) calc(-5vw + 669px), (min-width: 580px) 510px, calc(100vw - 30px)&quot; alt=&quot;Screenshot of the source page: Gemini 4 Carbon is now available&quot; data-asset=&quot;8247&quot;&gt;&lt;/a&gt;&lt;/figure&gt;

&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/ai-news-weekly-2026-11-13/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/ai-news-weekly-2026-11-13/ »&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>Get Started With Meta Muse in Python: Spark and Glimmer</title>
      <id>https://realpython.com/meta-muse-python/</id>
      <link href="https://realpython.com/meta-muse-python/"/>
      <updated>2026-11-13T14:00:00+00:00</updated>
      <summary>Get started with Meta Muse in Python. Make your first Muse Spark call, then add streaming, images, and tool calls, and try the open-weights Glimmer.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Getting started with Meta Muse in Python takes only a few lines of code, because Meta’s Model API speaks the same protocol as OpenAI’s. Knowing what you get for your money takes a bit longer. In this tutorial, you’ll call Muse Spark and the open-weights Muse Glimmer, stream a conversation, send an image, run a tool call, and parse typed output, with real timings and costs from the test runs.&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;Muse models&lt;/strong&gt; are Meta’s family of AI models for developers. Muse Spark is a reasoning &lt;a href=&quot;/ref/ai-coding-glossary/llm/&quot; class=&quot;ref-link&quot;&gt;large language model (LLM)&lt;/a&gt; that you call through the Meta Model API. Muse Glimmer is a 30-billion-parameter model whose weights you can download. Meta also uses the name Muse for a consumer app and a gadget, so the &lt;a href=&quot;#muse-models-vs-the-muse-agent-and-muse-charm&quot;&gt;next section&lt;/a&gt; sorts out which is which.&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;Muse&lt;/strong&gt; on its own is Meta’s &lt;strong&gt;consumer AI agent&lt;/strong&gt;, which has no public API, while the &lt;strong&gt;Muse models&lt;/strong&gt; are what you call from Python.&lt;/li&gt;
&lt;li&gt;You can reach &lt;strong&gt;Muse Spark&lt;/strong&gt; through &lt;strong&gt;Meta’s own endpoint&lt;/strong&gt; or through &lt;strong&gt;OpenRouter&lt;/strong&gt;, which charges the &lt;strong&gt;same token prices&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Reasoning is always on&lt;/strong&gt;, but &lt;strong&gt;lowering the effort&lt;/strong&gt; to &lt;code&gt;&quot;minimal&quot;&lt;/code&gt; cut &lt;strong&gt;latency&lt;/strong&gt; by more than half and &lt;strong&gt;cost&lt;/strong&gt; by about 60 percent in this tutorial’s test, without losing accuracy.&lt;/li&gt;
&lt;li&gt;Muse Spark handles &lt;strong&gt;images&lt;/strong&gt;, &lt;strong&gt;tool calls&lt;/strong&gt;, and &lt;strong&gt;structured output&lt;/strong&gt; through the standard OpenAI request format.&lt;/li&gt;
&lt;li&gt;Hosted &lt;strong&gt;Muse Glimmer&lt;/strong&gt; answered the same test question for about &lt;strong&gt;one-eighth&lt;/strong&gt; of Spark’s cost, and its &lt;strong&gt;Apache 2.0&lt;/strong&gt; license allows commercial use.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To decide where to start, find your situation in this table:&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;Your situation&lt;/th&gt;
&lt;th&gt;Recommendation&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Already use the &lt;code&gt;openai&lt;/code&gt; package and want a hosted &lt;a href=&quot;/ref/ai-coding-glossary/reasoning-model/&quot; class=&quot;ref-link&quot;&gt;reasoning model&lt;/a&gt; with a 1M-token context&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Muse Spark&lt;/strong&gt; through the Meta Model API or OpenRouter&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Want open &lt;a href=&quot;/ref/ai-coding-glossary/weight/&quot; class=&quot;ref-link&quot;&gt;weights&lt;/a&gt; that you can host on your own hardware under a permissive license&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Muse Glimmer&lt;/strong&gt; with &lt;a href=&quot;https://realpython.com/ollama-python/&quot;&gt;Ollama&lt;/a&gt; or a hosted provider&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Want a personal assistant that sends emails and shops for you, and don’t plan to write code&lt;/td&gt;
&lt;td&gt;The &lt;strong&gt;Muse&lt;/strong&gt; app&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;The next section untangles the Muse names.&lt;/p&gt;
&lt;div class=&quot;card mt-4 mb-4 bg-secondary&quot;&gt;
  &lt;p class=&quot;card-header h3 text-center bg-body-tertiary&quot;&gt;Free Bonus: &lt;strong&gt;LLM APIs and MCP Cheat Sheet&lt;/strong&gt;&lt;/p&gt;
  &lt;div class=&quot;card-body&quot;&gt;
    &lt;div class=&quot;container&quot;&gt;
      &lt;div class=&quot;row&quot;&gt;
        &lt;div class=&quot;col-xs-12 col-sm-4&quot;&gt;
          &lt;p&gt;Get an &lt;strong&gt;LLM APIs and MCP Cheat Sheet (PDF)&lt;/strong&gt; and keep API calls, structured outputs, tool calling, agent loops, and MCP servers at hand on one page:&lt;/p&gt;
        &lt;/div&gt;
        &lt;div class=&quot;col-xs-12 col-sm-8 text-center&quot;&gt;
          &lt;img class=&quot;img-fluid rounded mb-3 w-100&quot; src=&quot;https://files.realpython.com/media/llm-apis-mcp-cheat-sheet-stacked.eecfa10565d5.png&quot; alt=&quot;LLM APIs and MCP Cheat Sheet&quot;&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class=&quot;row mb-3&quot;&gt;
        &lt;div class=&quot;col-12&quot;&gt;

&lt;form action=&quot;/optins/process/&quot; method=&quot;post&quot; class=&quot;mb-0&quot;&gt;
  &lt;input type=&quot;hidden&quot; name=&quot;slug&quot; value=&quot;llm-apis-mcp-cheat-sheet&quot;&gt;
&lt;input type=&quot;hidden&quot; name=&quot;version&quot; value=&quot;586&quot;&gt;
&lt;input type=&quot;hidden&quot; name=&quot;source_path&quot; value=&quot;&quot;&gt;


  &lt;div class=&quot;mb-3&quot;&gt;
    &lt;input name=&quot;email&quot; type=&quot;email&quot; class=&quot;form-control form-control-lg&quot; placeholder=&quot;Email Address&quot; aria-label=&quot;Email Address&quot; autocomplete=&quot;email&quot; required&gt;
  &lt;/div&gt;
  &lt;button name=&quot;submit&quot; type=&quot;submit&quot; class=&quot;btn btn-primary btn-lg w-100&quot;&gt;Send My LLM APIs and MCP Cheat Sheet »&lt;/button&gt;

&lt;/form&gt;
&lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&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.ef3487c363c6.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 “Get Started With Meta Muse in Python: Spark and Glimmer” 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/meta-muse-python/&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: #ffc873;&quot; alt=&quot;Two people test two machines labeled Spark and Glimmer, one sealed with a padlock and one open, joined by a tokens gauge and a cost counter with gold coins.&quot; src=&quot;https://files.realpython.com/media/meta-muse-python-2.c8b9bf8d80b8.png&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/meta-muse-python-2.c8b9bf8d80b8.png 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/meta-muse-python-2.c8b9bf8d80b8.png 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/meta-muse-python-2.c8b9bf8d80b8.png 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/meta-muse-python-2.c8b9bf8d80b8.png 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.ef3487c363c6.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/meta-muse-python/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;Get Started With Meta Muse in Python: Spark and Glimmer&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;Check your grasp of calling Muse Spark from Python, from reasoning tokens and images to tool calls, typed output, and the open Muse Glimmer.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;

&lt;h2 id=&quot;muse-models-vs-the-muse-agent-and-muse-charm&quot;&gt;Muse Models vs the Muse Agent and Muse Charm&lt;a class=&quot;headerlink&quot; href=&quot;#muse-models-vs-the-muse-agent-and-muse-charm&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Meta uses the name Muse for developer models, a consumer &lt;a href=&quot;/ref/ai-coding-glossary/agent/&quot; class=&quot;ref-link&quot;&gt;agent&lt;/a&gt;, and an upcoming gadget, and you access each one in a different way.&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;Muse models&lt;/strong&gt; are developer products: Muse Wonder, Muse Spark, Muse Ember, Muse Glimmer, Muse Code, Muse Image, and Muse Voice Transcribe. You call the hosted ones through the &lt;a href=&quot;https://dev.meta.ai/docs/overview&quot;&gt;Meta Model API&lt;/a&gt; with an &lt;a href=&quot;/ref/glossary/api/&quot; class=&quot;ref-link&quot;&gt;API&lt;/a&gt; key and pay for what you use. Glimmer is the exception, because Meta publishes its open weights instead of hosting it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Muse&lt;/strong&gt; on its own is Meta’s personal AI agent. Meta &lt;a href=&quot;https://about.fb.com/news/2026/09/introducing-muse-personal-ai-agent/&quot;&gt;introduced it on September 8, 2026&lt;/a&gt; as an agent that “proactively helps with people’s goals and suggests ideas.” You reach it through iOS and Android apps, the web at muse.ai, WhatsApp, and a Mac desktop app. For now, it’s available only in the US.&lt;/p&gt;
&lt;p&gt;The agent sends emails, books travel, and shops through connectors such as Instacart. It’s free up to a weekly usage limit, and the &lt;a href=&quot;https://www.meta.com/help/subscriptions/1021145227643680/&quot;&gt;Power and Maximum plans&lt;/a&gt; cost $20 and $100 a month. Meta says the agent is powered by “Muse Spark, Meta’s most capable model to date, built for real-world agentic work,” without naming a version.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Muse Charm&lt;/strong&gt; is the gadget. Meta announced it at Connect on September 23, 2026, and promises only “more to share later this year” in its &lt;a href=&quot;https://about.fb.com/news/2026/09/the-biggest-news-from-connect-2026/&quot;&gt;Connect recap&lt;/a&gt;. It hasn’t shipped and has no price. Press reports describe a keychain-sized device with a two-inch touchscreen and 5G, but &lt;a href=&quot;https://www.dezeen.com/2026/09/25/meta-debuts-tamagotchi-style-ai-agent/&quot;&gt;sources disagree about its camera&lt;/a&gt;, so treat these specs as provisional.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Muse Gadgets&lt;/strong&gt; lets you build your own hardware for Muse. On October 2, 2026, Meta open-sourced the &lt;a href=&quot;https://github.com/facebookincubator/muse-gadget-sdk&quot;&gt;Muse Gadget SDK&lt;/a&gt; under Apache 2.0, with firmware for ESP32 boards and a &lt;a href=&quot;/ref/computer-science-glossary/linux/&quot; class=&quot;ref-link&quot;&gt;Linux&lt;/a&gt; SDK for machines such as a &lt;a href=&quot;https://realpython.com/python-raspberry-pi/&quot;&gt;Raspberry Pi&lt;/a&gt;. To pair a device, you create an SDK token at gadgets.muse.ai and turn on &lt;em&gt;Developer mode&lt;/em&gt; in the Muse app.&lt;/p&gt;
&lt;p&gt;The Linux &lt;a href=&quot;/ref/computer-science-glossary/software-development-kit/&quot; class=&quot;ref-link&quot;&gt;SDK&lt;/a&gt; is the part for Python developers. It’s a Python package called &lt;code&gt;musegadget&lt;/code&gt; that needs Python 3.9 or newer. It isn’t on &lt;a href=&quot;/ref/glossary/pypi/&quot; class=&quot;ref-link&quot;&gt;PyPI&lt;/a&gt;, so you install it with the repository’s &lt;code&gt;install.sh&lt;/code&gt; script. Once your machine is paired, Muse can run commands on it, and you can add your own commands in Python. Scripts on the machine can also post into your Muse chat with &lt;code&gt;musegadget send-user-msg&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The three products differ mostly in how you can reach them:&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;&lt;/th&gt;
&lt;th&gt;Muse models&lt;/th&gt;
&lt;th&gt;Muse agent&lt;/th&gt;
&lt;th&gt;Muse Charm&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;What it is&lt;/td&gt;
&lt;td&gt;Hosted and open-weights models&lt;/td&gt;
&lt;td&gt;Personal AI agent app&lt;/td&gt;
&lt;td&gt;Pocket device for talking to Muse&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Status&lt;/td&gt;
&lt;td&gt;Model API generally available since Connect 2026, Glimmer and Muse Spark Open weights public&lt;/td&gt;
&lt;td&gt;Live in the US since September 8, 2026&lt;/td&gt;
&lt;td&gt;Announced, not released&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Account and billing&lt;/td&gt;
&lt;td&gt;Model API team account, payment card, usage-based billing&lt;/td&gt;
&lt;td&gt;Meta account, Free, Power, or Maximum plan&lt;/td&gt;
&lt;td&gt;No price announced&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Data terms&lt;/td&gt;
&lt;td&gt;Data from the standard tier isn’t used for &lt;a href=&quot;/ref/ai-coding-glossary/training/&quot; class=&quot;ref-link&quot;&gt;training&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Not shared with ads systems, model training is opt-out&lt;/td&gt;
&lt;td&gt;Not announced&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Python access&lt;/td&gt;
&lt;td&gt;Full API through the &lt;code&gt;openai&lt;/code&gt; package&lt;/td&gt;
&lt;td&gt;No public API. Reviewed connectors, or a Muse Gadget paired to your own account&lt;/td&gt;
&lt;td&gt;None, but you can build your own with Muse Gadgets&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;The consumer agent has no public API that you can call with a key the way you call the Model API. A paired gadget only reaches your own Muse. To reach other people’s Muse agents, you submit an existing &lt;a href=&quot;/ref/ai-coding-glossary/mcp/&quot; class=&quot;ref-link&quot;&gt;Model Context Protocol (MCP)&lt;/a&gt; server or an API to the &lt;a href=&quot;https://muse.ai/platform&quot;&gt;Muse Connector Platform&lt;/a&gt;. Meta reviews it for “functional, security, and legal requirements” before it appears in Muse’s directory.&lt;/p&gt;
&lt;p&gt;Meta’s developer documentation doesn’t tie a Power or Maximum plan to Model API usage, so expect to pay for the app and the API separately.&lt;/p&gt;
&lt;p&gt;Older products called Muse, such as the InteraXon meditation headband, Microsoft’s gameplay model, and Google’s text-to-image research, are unrelated.&lt;/p&gt;
&lt;h2 id=&quot;get-started-with-meta-muse-in-python&quot;&gt;Get Started With Meta Muse in Python&lt;a class=&quot;headerlink&quot; href=&quot;#get-started-with-meta-muse-in-python&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;As of November 2026, Meta’s developer lineup includes these products:&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;Product&lt;/th&gt;
&lt;th&gt;API ID&lt;/th&gt;
&lt;th&gt;Weights&lt;/th&gt;
&lt;th&gt;Price&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Muse Wonder 1.0 (preview)&lt;/td&gt;
&lt;td&gt;&lt;code&gt;muse-wonder-1.0&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Closed&lt;/td&gt;
&lt;td&gt;$4.00 input and $20.00 output per 1M tokens&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Muse Spark 1.3&lt;/td&gt;
&lt;td&gt;&lt;code&gt;muse-spark-1.3&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Closed&lt;/td&gt;
&lt;td&gt;$1.25 input and $4.25 output per 1M tokens&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Muse Spark Open&lt;/td&gt;
&lt;td&gt;Not on the Model API&lt;/td&gt;
&lt;td&gt;Open, Muse Model License&lt;/td&gt;
&lt;td&gt;Free to self-host on a multi-GPU server, or through hosted providers&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Muse Ember 1.0&lt;/td&gt;
&lt;td&gt;&lt;code&gt;muse-ember-1.0&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Closed&lt;/td&gt;
&lt;td&gt;$0.10 input and $0.50 output per 1M tokens for requests up to 200K tokens&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Muse Glimmer 30B&lt;/td&gt;
&lt;td&gt;Not on the Model API&lt;/td&gt;
&lt;td&gt;Open, Apache 2.0&lt;/td&gt;
&lt;td&gt;Free to self-host, or from $0.30 input and $1.10 output per 1M tokens hosted&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Muse Code&lt;/td&gt;
&lt;td&gt;Command-line tool &lt;code&gt;muse&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Closed&lt;/td&gt;
&lt;td&gt;API rates, or plans from $5 a month&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Muse Image&lt;/td&gt;
&lt;td&gt;&lt;code&gt;muse-image-1.0&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Closed&lt;/td&gt;
&lt;td&gt;$0.01 per image&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Muse Voice Transcribe&lt;/td&gt;
&lt;td&gt;&lt;code&gt;muse-voice-transcribe-1.0&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Closed&lt;/td&gt;
&lt;td&gt;$0.18 per hour of audio&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/meta-muse-python/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/meta-muse-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>The Real Python Podcast – Episode #319: Mentoring Developers Beyond the Code With Tim Schilling</title>
      <id>https://realpython.com/podcasts/rpp/319/</id>
      <link href="https://realpython.com/podcasts/rpp/319/"/>
      <updated>2026-11-13T12:00:00+00:00</updated>
      <summary>What&#x27;s it take to be a mentor to developers? Where in an engineer&#x27;s career can a mentor make an impact? This week we speak with Tim Schilling, Django Steering Council member and Djangonaut Space administrator, about mentoring Python developers.</summary>
      <content type="html">
        &lt;p&gt;What&#x27;s it take to be a mentor to developers? Where in an engineer&#x27;s career can a mentor make an impact? This week we speak with Tim Schilling, Django Steering Council member and Djangonaut Space administrator, about mentoring Python developers.&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: Working With JSON in Python</title>
      <id>https://realpython.com/quizzes/working-json-data-python/</id>
      <link href="https://realpython.com/quizzes/working-json-data-python/"/>
      <updated>2026-11-13T12:00:00+00:00</updated>
      <summary>Test your understanding of Python&#x27;s json module, from serializing and deserializing data to encoding and decoding custom types.</summary>
      <content type="html">
        &lt;p&gt;In this quiz, you&amp;rsquo;ll test your understanding of the video course
&lt;a href=&quot;https://realpython.com/courses/working-json-data-python/&quot;&gt;Working With JSON in Python&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit how serialization and deserialization work,
how Python types map to JSON, how to read JSON from a web API, and how to encode and
decode custom types like complex numbers.&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>Learn With Mentor AI: Working Through a Coding Exercise</title>
      <id>https://realpython.com/mentor-ai-coding-exercise/</id>
      <link href="https://realpython.com/mentor-ai-coding-exercise/"/>
      <updated>2026-11-12T14:00:00+00:00</updated>
      <summary>Learn how to use Mentor AI on a Real Python coding exercise. Ask why a test failed, get hints instead of the answer, and check your understanding.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Real Python has hundreds of &lt;a href=&quot;https://realpython.com/coding-exercises/&quot;&gt;coding exercises&lt;/a&gt; that let you practice what you’ve learned in a tutorial or course. Each exercise gives you a task, a code editor, and a set of tests that check your solution. When all the tests pass, you’ve solved the exercise.&lt;/p&gt;
&lt;p&gt;Sometimes, though, the tests keep failing and you can’t figure out why. At that point, it’s tempting to open the solution and copy it. The tests turn green, but you don’t learn much from it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Mentor AI&lt;/strong&gt; is an AI tutor built into the Real Python platform. It can help you get unstuck on a coding exercise without handing you the answer. You open it by clicking the round orb in the bottom-right corner of any page or using the &lt;span class=&quot;keys&quot;&gt;&lt;kbd class=&quot;key-control&quot;&gt;Ctrl&lt;/kbd&gt;&lt;span&gt;+&lt;/span&gt;&lt;kbd class=&quot;key-m&quot;&gt;M&lt;/kbd&gt;&lt;/span&gt; shortcut. If the orb covers something you want to read, then you can drag it anywhere on the screen:&lt;/p&gt;
&lt;div&gt;





&lt;div class=&quot;ratio rounded overflow-hidden mb-3 bg-body-tertiary video-animation--bordered&quot; style=&quot;aspect-ratio: 1920/1080;&quot;&gt;
  &lt;video-animation data-src=&quot;https://stream.realpython.com/043b5bda-edef-4237-8857-2129045f0b6c/playlist.m3u8&quot;&gt;
    &lt;video muted loop playsinline preload=&quot;none&quot; poster=&quot;https://stream.realpython.com/043b5bda-edef-4237-8857-2129045f0b6c/thumbnail.jpg?width=1280&quot; disablepictureinpicture disableremoteplayback&gt;&lt;/video&gt;
  &lt;/video-animation&gt;
&lt;/div&gt;



&lt;/div&gt;

&lt;p class=&quot;mentor-ask-row&quot; data-mentor-scope&gt;&lt;button type=&quot;button&quot; class=&quot;btn btn-sm btn-dark bg-gradient mentor-ask-btn&quot; data-mentor-ask=&quot;How can you help me when I&#x27;m stuck on a coding exercise?&quot; data-mentor-intent=&quot;content-ask&quot; data-mentor-source=&quot;tag&quot; data-mentor-style=&quot;button&quot; data-mentor-fresh=&quot;1&quot;&gt;&lt;span class=&quot;icon maia-mark me-1&quot; aria-hidden=&quot;true&quot;&gt;&lt;img src=&quot;/static/mentor/maia.f5d7e1f0f56c.svg&quot; alt=&quot;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mentor-ask-label&quot;&gt;Try it now&lt;/span&gt;&lt;/button&gt;&lt;/p&gt;

&lt;p&gt;Mentor AI knows which tutorial, lesson, or exercise you’re looking at. On an exercise page, it can also look at the code you’ve run and your test results, so you don’t have to copy them into the chat. You can ask it to explain a failing test, give you a hint instead of the answer, or check whether you’ve understood an idea.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this tutorial, you’ll learn how to:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Run the tests&lt;/strong&gt; and read the results before asking for help&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Ask Mentor AI why a test failed&lt;/strong&gt; without pasting any code&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Check your understanding&lt;/strong&gt; by predicting what the code does&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Ask for a hint&lt;/strong&gt; about a specific failing test instead of the full solution&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Request an example&lt;/strong&gt; when an explanation isn’t enough&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Get your solution reviewed&lt;/strong&gt;, explain it back, and take a short quiz&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;Free Kit:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/kits/learn-with-mentor-ai/&quot;&gt;Click here to get the Learn With Mentor AI Kit&lt;/a&gt; with cheat sheets, a video course, and a quiz that help you learn faster with your mentor and build the Python skills employers look for.&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.ef3487c363c6.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 “Learn With Mentor AI: Working Through a Coding Exercise” 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/mentor-ai-coding-exercise/&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: #ffc873;&quot; alt=&quot;Two people working a test machine with FAIL and PASS lamps and a RUN TESTS lever while a glowing robot mentor hands one of them a HINT card.&quot; src=&quot;https://files.realpython.com/media/mentor-ai-coding-exercise-1.47a54ff10220.png&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/mentor-ai-coding-exercise-1.47a54ff10220.png 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/mentor-ai-coding-exercise-1.47a54ff10220.png 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/mentor-ai-coding-exercise-1.47a54ff10220.png 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/mentor-ai-coding-exercise-1.47a54ff10220.png 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.ef3487c363c6.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/mentor-ai-coding-exercise/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;Learn With Mentor AI: Working Through a Coding Exercise&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;Practice getting unstuck on a Python coding exercise with Mentor AI, from mutable default arguments to checking for None with is.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;

&lt;p&gt;You’ll practice all of this by working through one real exercise, &lt;em&gt;Fix the Sticky Default List&lt;/em&gt;, step by step. Each step shows what to click, what to type, and what Mentor AI said in an example session.&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 follow along with this tutorial, you’ll need the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;A Real Python membership with Mentor AI access:&lt;/strong&gt; The exercise you’ll use is part of a members-only course, and you need to be signed in to use Mentor AI. If you’re not a member yet, then you can &lt;a href=&quot;https://realpython.com/account/join/?plan=trial&quot;&gt;start a free 7-day trial&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Basic Python knowledge:&lt;/strong&gt; You should know how to &lt;a href=&quot;https://realpython.com/defining-your-own-python-function/&quot;&gt;define a function&lt;/a&gt;, use a &lt;a href=&quot;https://realpython.com/python-optional-arguments/#default-values-assigned-to-input-parameters&quot;&gt;default argument&lt;/a&gt;, and &lt;a href=&quot;https://realpython.com/python-append/&quot;&gt;append items to a list&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You’ll work on the &lt;a href=&quot;https://realpython.com/lessons/exercise-fix-sticky-default-list/&quot;&gt;Fix the Sticky Default List&lt;/a&gt; exercise from the &lt;a href=&quot;https://realpython.com/courses/python-none/&quot;&gt;Python’s None: Null in Python&lt;/a&gt; course. Open it in a new browser tab now so you can switch between the exercise and this tutorial.&lt;/p&gt;
&lt;p&gt;The exercise gives you a function called &lt;code&gt;add_element()&lt;/code&gt;. It’s supposed to append an item to the &lt;a href=&quot;/ref/builtin-types/list/&quot; class=&quot;ref-link&quot;&gt;list&lt;/a&gt; you pass in and return that same list, so the caller’s own list changes too. If you don’t pass a list, then it should start with a new, empty one. Here’s the starter code that you’ll see in the editor:&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;def&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;add_element&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;new_elem&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;starter_list&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;w&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;sd&quot;&gt;&quot;&quot;&quot;Append new_elem to starter_list and return the list.&quot;&quot;&quot;&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;starter_list&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;new_elem&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;starter_list&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.ef3487c363c6.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’s what happens when you call this function twice without passing a list. You don’t need to run these calls yourself. They just show the bug:&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.ef3487c363c6.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;add_element&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;go&quot;&gt;[1]&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_element&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;[1, 2]&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.ef3487c363c6.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 second call should return &lt;code&gt;[2]&lt;/code&gt;, but the &lt;code&gt;1&lt;/code&gt; from the first call is still there. That’s the bug, and your job is to fix it. If you already know how, that’s fine. Follow the steps anyway to see how Mentor AI can help you.&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; Mentor AI writes a new answer every time, so its replies won’t match the examples in this tutorial word for word. The examples come from a real session and show you what to expect.&lt;/p&gt;
&lt;/div&gt;
&lt;h2 id=&quot;step-1-run-the-tests-in-the-coding-exercise&quot;&gt;Step 1: Run the Tests in the Coding Exercise&lt;a class=&quot;headerlink&quot; href=&quot;#step-1-run-the-tests-in-the-coding-exercise&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Before you ask for help, find out what’s wrong. Above the code editor on the exercise page, you’ll find two buttons: &lt;em&gt;Reset&lt;/em&gt; and &lt;em&gt;Run Tests&lt;/em&gt;. Click &lt;em&gt;Run Tests&lt;/em&gt; without changing any code:&lt;/p&gt;
&lt;figure class=&quot;&quot;&gt;&lt;img loading=&quot;lazy&quot; class=&quot;img-fluid mx-auto d-block &quot; src=&quot;https://files.realpython.com/media/maia-coding-exercise-run-tests-buttons.55f54b1a7f56.png&quot; width=&quot;2400&quot; height=&quot;236&quot; srcset=&quot;/cdn-cgi/image/width=600,format=auto/https://files.realpython.com/media/maia-coding-exercise-run-tests-buttons.55f54b1a7f56.png 600w, /cdn-cgi/image/width=800,format=auto/https://files.realpython.com/media/maia-coding-exercise-run-tests-buttons.55f54b1a7f56.png 800w, /cdn-cgi/image/width=1200,format=auto/https://files.realpython.com/media/maia-coding-exercise-run-tests-buttons.55f54b1a7f56.png 1200w, /cdn-cgi/image/width=2400,format=auto/https://files.realpython.com/media/maia-coding-exercise-run-tests-buttons.55f54b1a7f56.png 2400w&quot; sizes=&quot;(min-width: 1200px) 690px, (min-width: 780px) calc(-5vw + 669px), (min-width: 580px) 510px, calc(100vw - 30px)&quot; alt=&quot;Coding exercise editor header with the solution.py filename next to the Reset and Run Tests buttons&quot; data-asset=&quot;7715&quot;&gt;&lt;figcaption class=&quot;figure-caption text-center&quot;&gt;The Reset and Run Tests Buttons Above the Code Editor&lt;/figcaption&gt;&lt;/figure&gt;

&lt;p&gt;The &lt;em&gt;Test Results&lt;/em&gt; panel on the right side of the page shows the outcome. Each test has a short name that describes what it checks, such as:&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/mentor-ai-coding-exercise/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/mentor-ai-coding-exercise/ »&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: Learn With Mentor AI: Working Through a Coding Exercise</title>
      <id>https://realpython.com/quizzes/mentor-ai-coding-exercise/</id>
      <link href="https://realpython.com/quizzes/mentor-ai-coding-exercise/"/>
      <updated>2026-11-12T12:00:00+00:00</updated>
      <summary>Practice getting unstuck on a Python coding exercise with Mentor AI, from mutable default arguments to checking for None with is.</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/mentor-ai-coding-exercise/&quot;&gt;Working Through a Coding Exercise With Mentor AI&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit how Mentor AI helps you get unstuck on a coding exercise without handing you the answer. You&amp;rsquo;ll also review why mutable default arguments cause bugs and why &lt;code&gt;is None&lt;/code&gt; is the right way to check for &lt;code&gt;None&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: Python HTTPX: Making HTTP Requests With HTTPX2</title>
      <id>https://realpython.com/quizzes/python-httpx/</id>
      <link href="https://realpython.com/quizzes/python-httpx/"/>
      <updated>2026-11-11T12:00:00+00:00</updated>
      <summary>Test your knowledge of Python HTTPX2 by reusing clients, sending async requests, setting timeouts, streaming responses, and enabling HTTP/2.</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-httpx/&quot;&gt;Python HTTPX: Making HTTP Requests With HTTPX2&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit how to reuse connections with a &lt;code&gt;Client&lt;/code&gt;,
send concurrent requests with &lt;code&gt;AsyncClient&lt;/code&gt;, handle timeouts and errors, stream large
responses, and enable HTTP/2.&lt;/p&gt;
&lt;p&gt;HTTPX2 is Pydantic&amp;rsquo;s fork of the original HTTPX project, and it keeps the Requests-style
API that you may already know.&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 Coding Interview Practice: Hashing, Pointers, and Windows</title>
      <id>https://realpython.com/courses/coding-interview-practice-hashing-two-pointers-sliding-windows/</id>
      <link href="https://realpython.com/courses/coding-interview-practice-hashing-two-pointers-sliding-windows/"/>
      <updated>2026-11-10T14:00:00+00:00</updated>
      <summary>Practice hashing, two pointers, and sliding windows in Python through 20 coding interview exercises with tests, hints, and guided code reviews.</summary>
      <content type="html">
        &lt;p&gt;Build your coding interview skills with hashing, two pointers, and sliding windows. Practice each pattern, choose approaches in mixed problems, and explain the time and space costs of your solutions.&lt;/p&gt;
&lt;div class=&quot;alert alert-primary&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong&gt;Free Kit:&lt;/strong&gt; Getting ready for interviews? Get the &lt;a href=&quot;https://realpython.com/kits/tech-career-story/&quot;&gt;Tech Career Story Kit&lt;/a&gt; with career folder templates, a quick reference, and quizzes, including a folder for your interview prep notes. You only need a free Real Python account.&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>Python Coding Interview Practice: Prefix Sums and Binary Search</title>
      <id>https://realpython.com/courses/coding-interview-practice-prefix-sums-binary-search/</id>
      <link href="https://realpython.com/courses/coding-interview-practice-prefix-sums-binary-search/"/>
      <updated>2026-11-10T14:00:00+00:00</updated>
      <summary>Practice prefix sums and binary search in Python through 14 coding interview exercises with tests, efficiency checks, hints, and code reviews.</summary>
      <content type="html">
        &lt;p&gt;Build your coding interview skills with prefix sums and binary search. Practice each pattern, choose approaches in mixed problems, and explain the time and space costs of your solutions.&lt;/p&gt;
&lt;div class=&quot;alert alert-primary&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong&gt;Free Kit:&lt;/strong&gt; Getting ready for interviews? Get the &lt;a href=&quot;https://realpython.com/kits/tech-career-story/&quot;&gt;Tech Career Story Kit&lt;/a&gt; with career folder templates, a quick reference, and quizzes, including a folder for your interview prep notes. You only need a free Real Python account.&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>Quiz: Python Coding Interview Practice: Hashing, Pointers, and Windows</title>
      <id>https://realpython.com/quizzes/coding-interview-practice-hashing-two-pointers-sliding-windows/</id>
      <link href="https://realpython.com/quizzes/coding-interview-practice-hashing-two-pointers-sliding-windows/"/>
      <updated>2026-11-10T12:00:00+00:00</updated>
      <summary>Check your grasp of hashing, two pointers, and sliding windows, and learn to pick an approach from a problem&#x27;s time and space constraints.</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/coding-interview-practice-hashing-two-pointers-sliding-windows/&quot;&gt;Python Coding Interview Practice: Hashing, Pointers, and Windows&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit how sets and dictionaries trade space
for time, why each two-pointer move is safe, how a sliding window keeps its summary
accurate, and how to choose an approach from a problem&amp;rsquo;s constraints.&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 Coding Interview Practice: Prefix Sums and Binary Search</title>
      <id>https://realpython.com/quizzes/coding-interview-practice-prefix-sums-binary-search/</id>
      <link href="https://realpython.com/quizzes/coding-interview-practice-prefix-sums-binary-search/"/>
      <updated>2026-11-10T12:00:00+00:00</updated>
      <summary>Check your grasp of prefix sums and binary search, and learn to pick between them from a problem&#x27;s values, ordering, and time bounds.</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/coding-interview-practice-prefix-sums-binary-search/&quot;&gt;Python Coding Interview Practice: Prefix Sums and Binary Search&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit how prefix totals turn range sums into
subtraction, what to store about earlier prefixes, how a search interval shrinks
safely, and how to choose an approach from a problem&amp;rsquo;s constraints.&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: Getting Started With Git</title>
      <id>https://realpython.com/quizzes/getting-started-with-git/</id>
      <link href="https://realpython.com/quizzes/getting-started-with-git/"/>
      <updated>2026-11-10T12:00:00+00:00</updated>
      <summary>Test your Git basics, from configuring your identity and committing changes to rewriting history and ignoring files you don&#x27;t need.</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/getting-started-with-git/&quot;&gt;Getting Started With Git&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit how to configure Git, create a repository,
stage and commit changes, fix commit messages, undo mistakes with &lt;code&gt;git restore&lt;/code&gt; and
&lt;code&gt;git reset&lt;/code&gt;, and ignore files with &lt;code&gt;.gitignore&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Git keeps a running history of your project, so you can always see what changed and
go back when something breaks.&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: TDD With AI Agents: Design the Tests First, Let the Agent Implement</title>
      <id>https://realpython.com/quizzes/tdd-ai-agents/</id>
      <link href="https://realpython.com/quizzes/tdd-ai-agents/"/>
      <updated>2026-11-09T12:00:00+00:00</updated>
      <summary>Check your grasp of TDD with AI agents in Python. Write the contract and tests first, then let a coding agent implement code that passes them.</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/tdd-ai-agents/&quot;&gt;TDD With AI Agents: Design the Tests First, Let the Agent Implement&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit how to define a contract, let an agent
draft tests, harden those tests, fence them off while the agent implements, and review
the resulting diff.&lt;/p&gt;
&lt;p&gt;These habits keep you in charge of the design while the agent does the typing, so you
can trust the code it hands back.&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 #318: Free-Threaded Python: Why Python Devs Should Know About the ABI</title>
      <id>https://realpython.com/podcasts/rpp/318/</id>
      <link href="https://realpython.com/podcasts/rpp/318/"/>
      <updated>2026-11-06T12:00:00+00:00</updated>
      <summary>Why should every Python developer know about the CPython ABI? This week on the show, we speak with Nathan Goldbaum about free-threaded Python and the changes to the Python Application Binary Interface.</summary>
      <content type="html">
        &lt;p&gt;Why should every Python developer know about the CPython ABI? This week on the show, we speak with Nathan Goldbaum about free-threaded Python and the changes to the Python Application Binary Interface.&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>Converting Documents to Markdown With MarkItDown</title>
      <id>https://realpython.com/courses/converting-documents-markdown-markitdown/</id>
      <link href="https://realpython.com/courses/converting-documents-markdown-markitdown/"/>
      <updated>2026-11-03T14:00:00+00:00</updated>
      <summary>Learn how to use MarkItDown to convert Excel files, PDFs, and images into clean Markdown that&#x27;s ready for LLMs and AI workflows.</summary>
      <content type="html">
        &lt;p&gt;The MarkItDown library lets you quickly turn PDFs, Office files, images, HTML, and URLs into LLM-ready Markdown. In this video course, you&amp;rsquo;ll install MarkItDown, use it in Python code to convert and batch-process documents, connect it to AI clients through its MCP server, and see where it falls short compared to tools like Pandoc.&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;Markdown&lt;/strong&gt; keeps text straightforward while preserving document structure, which makes it a good input format for &lt;strong&gt;LLMs&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;You can &lt;strong&gt;install MarkItDown&lt;/strong&gt; with &lt;code&gt;pip&lt;/code&gt; using the &lt;strong&gt;&lt;code&gt;[all]&lt;/code&gt;&lt;/strong&gt; specifier to pull in optional dependencies.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;&lt;code&gt;.convert()&lt;/code&gt;&lt;/strong&gt; method reads the input document and converts it to &lt;strong&gt;Markdown text&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;You can &lt;strong&gt;batch-convert&lt;/strong&gt; a directory of mixed file formats by looping over the files in a Python script.&lt;/li&gt;
&lt;li&gt;You can connect MarkItDown&amp;rsquo;s &lt;strong&gt;MCP server&lt;/strong&gt; to clients like &lt;strong&gt;Claude Desktop&lt;/strong&gt; to expose on-demand conversions to chats.&lt;/li&gt;
&lt;li&gt;MarkItDown can integrate with LLMs to generate &lt;strong&gt;image descriptions&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;MarkItDown has &lt;strong&gt;limitations&lt;/strong&gt; with complex layouts, where a tool like &lt;strong&gt;Pandoc&lt;/strong&gt; is a better fit.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;With this foundation, you&amp;rsquo;ll be able to judge when MarkItDown is the fastest route from raw files to useful LLM context and when your project calls for a heavier-duty conversion 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>The Real Python Podcast – Episode #317: Demystifying Python Memory Management &amp; Choosing a Project Layout</title>
      <id>https://realpython.com/podcasts/rpp/317/</id>
      <link href="https://realpython.com/podcasts/rpp/317/"/>
      <updated>2026-10-30T12:00:00+00:00</updated>
      <summary>How does Python manage memory behind the scenes? What are the common ways to lay out a Python project? 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 does Python manage memory behind the scenes? What are the common ways to lay out a Python project? 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>Exploring AI Coding Agent Workflows</title>
      <id>https://realpython.com/courses/exploring-ai-coding-agent-workflows/</id>
      <link href="https://realpython.com/courses/exploring-ai-coding-agent-workflows/"/>
      <updated>2026-10-27T14:00:00+00:00</updated>
      <summary>AI coding agents come in four types: IDE, terminal, PR, and cloud. Learn how each workflow fits into modern Python development.</summary>
      <content type="html">
        &lt;p&gt;AI coding agents can read your code, reason about changes, and act on your behalf. To choose the right one, it helps to understand the four common workflow types: integrated development environment (IDE), terminal, pull request (PR), and cloud.&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;&lt;strong&gt;Identify&lt;/strong&gt; the four common &lt;strong&gt;agent interaction modes&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Understand&lt;/strong&gt; what makes &lt;strong&gt;each workflow distinct&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Recognize&lt;/strong&gt; which mode fits &lt;strong&gt;common development scenarios&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Weigh&lt;/strong&gt; the &lt;strong&gt;risks and tradeoffs&lt;/strong&gt; of each workflow&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Whether you&amp;rsquo;re pairing with an agent in your editor or handing off whole tasks to the cloud, you&amp;rsquo;ll come away knowing how much control each workflow gives you and where it&amp;rsquo;s most likely to trip you up.&lt;/p&gt;
&lt;div class=&quot;alert alert-primary&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong&gt;Codex Live Course:&lt;/strong&gt; Want hands-on practice with one of these workflows? In Real Python&amp;rsquo;s &lt;a href=&quot;https://realpython.com/workshops/codex/&quot;&gt;Codex for Python Developers&lt;/a&gt; live course, you build an entire Python project with Codex, an AI agent that works inside your codebase. The next course runs &lt;strong&gt;November 21 and 22&lt;/strong&gt;!&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>AI for Beginners: Use Agents With Confidence</title>
      <id>https://realpython.com/courses/ai-agents-101/</id>
      <link href="https://realpython.com/courses/ai-agents-101/"/>
      <updated>2026-10-26T14:00:00+00:00</updated>
      <summary>Learn how AI agents really work, from models and harnesses to context and skills, so you can get better results and stay in control.</summary>
      <content type="html">
        &lt;p&gt;AI agents don&amp;rsquo;t just answer questions anymore. They read your files, search the web, and take actions on your behalf. In this video course, you&amp;rsquo;ll learn how they really work, from models and harnesses to context and skills, so you can get better results and stay in control.&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;An AI app is a &lt;strong&gt;model&lt;/strong&gt; that does the thinking, plus a &lt;strong&gt;harness&lt;/strong&gt; that carries out the actions, and many confusing replies come from that split.&lt;/li&gt;
&lt;li&gt;A model works only with what&amp;rsquo;s in its &lt;strong&gt;context&lt;/strong&gt;, so what you hand it shapes every answer.&lt;/li&gt;
&lt;li&gt;Before an agent works for you, you can check &lt;strong&gt;where it runs, what it can touch, what gets sent, and who sees it&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Asking well&lt;/strong&gt; and &lt;strong&gt;starting fresh&lt;/strong&gt; at the right time get you better results and use fewer tokens.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Skills&lt;/strong&gt; let you package a job once and reuse it, and you can build your own.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Along the way, you&amp;rsquo;ll practice in interactive apps and guided mentor sessions, then finish by finding and fixing five problems in an AI assistant&amp;rsquo;s setup.&lt;/p&gt;
&lt;div class=&quot;alert alert-primary&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong&gt;Free Kit:&lt;/strong&gt; Get the &lt;a href=&quot;https://realpython.com/kits/junior-dev-ai/&quot;&gt;Junior Dev AI Starter Kit&lt;/a&gt; with videos, cheat sheets, and quizzes. You only need a free Real Python account.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;alert alert-primary&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong&gt;Codex Live Course:&lt;/strong&gt; Ready to put an agent to work on real code? In Real Python&amp;rsquo;s &lt;a href=&quot;https://realpython.com/workshops/codex/&quot;&gt;Codex for Python Developers&lt;/a&gt; live course, you build an entire Python project with Codex, an AI agent that works inside your codebase. The next course runs &lt;strong&gt;November 21 and 22&lt;/strong&gt;!&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 #316: The Future of Python Security: Trends, Challenges, and Solutions</title>
      <id>https://realpython.com/podcasts/rpp/316/</id>
      <link href="https://realpython.com/podcasts/rpp/316/"/>
      <updated>2026-10-23T12:00:00+00:00</updated>
      <summary>How is the Python ecosystem adapting to the modern landscape of software security and supply chain defense? This week on the show, we sit down with Seth Larson, the Python Software Foundation&#x27;s Security Developer in Residence.</summary>
      <content type="html">
        &lt;p&gt;How is the Python ecosystem adapting to the modern landscape of software security and supply chain defense? This week on the show, we sit down with Seth Larson, the Python Software Foundation&#x27;s Security Developer in Residence.&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 itertools By Example</title>
      <id>https://realpython.com/courses/python-itertools-by-example/</id>
      <link href="https://realpython.com/courses/python-itertools-by-example/"/>
      <updated>2026-10-21T14:00:00+00:00</updated>
      <summary>Combine Python&#x27;s itertools functions into memory-efficient pipelines as you deal cards, analyze stock data, and pick relay teams.</summary>
      <content type="html">
        &lt;p&gt;Python&amp;rsquo;s &lt;code&gt;itertools&lt;/code&gt; module is one of the hidden gems of the standard library. Knowing the definitions of its functions isn&amp;rsquo;t enough, though. Its real power lies in composing those functions into fast, memory-efficient, and readable code.&lt;/p&gt;
&lt;p&gt;Rather than introducing &lt;code&gt;itertools&lt;/code&gt; one function at a time, this video course works through practical examples that encourage you to think iteratively: you&amp;rsquo;ll shuffle and deal a deck of cards, analyze seventy years of S&amp;amp;P 500 prices, and pick relay teams for a community swim club.&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;The functions in &lt;code&gt;itertools&lt;/code&gt; &lt;strong&gt;operate on iterators&lt;/strong&gt; and compose into data pipelines that use far less memory than list-based code.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;batched()&lt;/code&gt; is the built-in way to &lt;strong&gt;split an iterable into chunks&lt;/strong&gt;, and it replaces the hand-rolled &lt;code&gt;grouper()&lt;/code&gt; recipe for most jobs.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;combinations()&lt;/code&gt;, &lt;code&gt;permutations()&lt;/code&gt;, and &lt;code&gt;product()&lt;/code&gt; let you &lt;strong&gt;brute-force&lt;/strong&gt; a problem, but they can trigger a combinatorial explosion.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;count()&lt;/code&gt;, &lt;code&gt;repeat()&lt;/code&gt;, &lt;code&gt;cycle()&lt;/code&gt;, and &lt;code&gt;accumulate()&lt;/code&gt; generate &lt;strong&gt;infinite sequences&lt;/strong&gt; and running totals.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;pairwise()&lt;/code&gt;, &lt;code&gt;groupby()&lt;/code&gt;, &lt;code&gt;takewhile()&lt;/code&gt;, and &lt;code&gt;dropwhile()&lt;/code&gt; turn real &lt;strong&gt;data analysis&lt;/strong&gt; tasks into short, readable pipelines.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The examples in this video course run on Python 3.15. You&amp;rsquo;ll need Python 3.12 or later for &lt;code&gt;batched()&lt;/code&gt;, and Python 3.15 for unpacking in comprehensions.&lt;/p&gt;
&lt;div class=&quot;alert alert-primary&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong&gt;Intermediate Python Deep Dive Live Course:&lt;/strong&gt; Want to keep going with iterators and data pipelines? Real Python&amp;rsquo;s &lt;a href=&quot;https://realpython.com/workshops/intermediate-deep-dive/&quot;&gt;Intermediate Python Deep Dive&lt;/a&gt; live course covers advanced iteration techniques, special methods, and Python&amp;rsquo;s object model with an instructor and a small cohort. Join the waitlist to hear about the next dates.&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>Tell Your Tech Career Story: Proof, Résumés, and Interviews</title>
      <id>https://realpython.com/courses/tell-your-tech-career-story/</id>
      <link href="https://realpython.com/courses/tell-your-tech-career-story/"/>
      <updated>2026-10-20T14:00:00+00:00</updated>
      <summary>Turn your experience into a clear career story with achievement stories, proof of skills, a tailored résumé, and interview practice with Mentor AI.</summary>
      <content type="html">
        &lt;p&gt;Turn your experience into a clear story that employers notice. Choose a target role, build a bank of honest achievement stories, curate proof of your skills, and write a résumé that you can tailor for a new posting in about thirty minutes. Then practice outreach and interviews in guided mentor sessions, and finish with an application campaign for real postings.&lt;/p&gt;
&lt;div class=&quot;alert alert-primary&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong&gt;Free Kit:&lt;/strong&gt; Get the &lt;a href=&quot;https://realpython.com/kits/tech-career-story/&quot;&gt;Tech Career Story Kit&lt;/a&gt; with career folder templates, a quick reference, and quizzes. You only need a free Real Python account.&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>Building an AI Agent With LangGraph and Python</title>
      <id>https://realpython.com/courses/building-ai-agent-langgraph-python/</id>
      <link href="https://realpython.com/courses/building-ai-agent-langgraph-python/"/>
      <updated>2026-10-20T14:00:00+00:00</updated>
      <summary>Learn LangGraph in Python with this hands-on video course and build a stateful AI agent using state graphs, nodes, and conditional edges.</summary>
      <content type="html">
        &lt;p&gt;LangGraph is a versatile Python framework designed for stateful, cyclic, and multi-actor Large Language Model (LLM) applications. LangGraph builds on its parent library, LangChain, and allows you to build sophisticated workflows that can handle the complexities of real-world LLM applications. Throughout this LangGraph video course, you&amp;rsquo;ll build a complete email-processing agent from the ground up.&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;You can use LangGraph to build LLM workflows by &lt;strong&gt;defining state graphs with nodes and edges&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;LangGraph extends LangChain&amp;rsquo;s capabilities by enabling complex LLM workflows with &lt;strong&gt;state, conditional edges, and cycles&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;LLM agents&lt;/strong&gt; in LangGraph autonomously process tasks by using state graphs to make decisions and interact with tools or APIs.&lt;/li&gt;
&lt;li&gt;You can use LangGraph independently of LangChain, though they&amp;rsquo;re often used together to complement each other.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Follow along with the full video course to gain hands-on experience with LangGraph, including setting up workflows and building a LangGraph agent that can autonomously parse and send emails and interact with API services.&lt;/p&gt;
&lt;p&gt;While you&amp;rsquo;ll get a brief primer on &lt;a href=&quot;https://realpython.com/build-llm-rag-chatbot-with-langchain/&quot;&gt;LangChain&lt;/a&gt; in this course, you&amp;rsquo;ll benefit from prior knowledge of LangChain fundamentals. You&amp;rsquo;ll also want to ensure you have intermediate Python knowledge, specifically in &lt;a href=&quot;https://realpython.com/python3-object-oriented-programming/&quot;&gt;object-oriented programming&lt;/a&gt; concepts like classes and methods.&lt;/p&gt;
&lt;div class=&quot;alert alert-primary&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong&gt;AI Agent From Scratch Live Course:&lt;/strong&gt; Want to see what LangGraph does for you under the hood? In Real Python&amp;rsquo;s &lt;a href=&quot;https://realpython.com/workshops/agentic-loops/&quot;&gt;Build an AI Agent From Scratch in Python&lt;/a&gt; live course, you write the agent loop by hand, then recognize every piece of it in the tools you already use. Join the waitlist to hear about the next dates.&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 #315: Python Pitfalls: Common Mistakes and How to Avoid Them</title>
      <id>https://realpython.com/podcasts/rpp/315/</id>
      <link href="https://realpython.com/podcasts/rpp/315/"/>
      <updated>2026-10-16T12:00:00+00:00</updated>
      <summary>What are common mistakes that Python beginners make, and how do you avoid them? 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 common mistakes that Python beginners make, and how do you avoid them? 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>How to Use Python: Taking Your First Steps</title>
      <id>https://realpython.com/courses/python-first-steps/</id>
      <link href="https://realpython.com/courses/python-first-steps/"/>
      <updated>2026-10-13T14:00:00+00:00</updated>
      <summary>Take your first steps with Python. Install it, run your first program, and work with variables, data types, loops, functions, and errors.</summary>
      <content type="html">
        &lt;p&gt;If you&amp;rsquo;re starting fresh with programming and wondering how to use Python, this video course will give you the foundation you need to get started with Python step by step. You&amp;rsquo;ll learn how to install Python, run your first program, and understand the language&amp;rsquo;s clear syntax.&lt;/p&gt;
&lt;p&gt;You&amp;rsquo;ll also explore variables, loops, functions, classes, and error handling while discovering tools, coding style, and libraries that help you write effective Python code from day one.&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 &lt;strong&gt;install Python&lt;/strong&gt; on Windows, macOS, and Linux using binaries, package managers, or distributions like Anaconda.&lt;/li&gt;
&lt;li&gt;You can use the &lt;strong&gt;Python REPL&lt;/strong&gt; to experiment &lt;strong&gt;interactively&lt;/strong&gt; before writing full scripts, modules, and projects.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Built-in data types&lt;/strong&gt; like strings, lists, dictionaries, and sets provide powerful ways to structure information.&lt;/li&gt;
&lt;li&gt;You can &lt;strong&gt;handle errors&lt;/strong&gt; with syntax checks, exceptions, and debugging practices to keep your code running smoothly.&lt;/li&gt;
&lt;li&gt;Tools like &lt;strong&gt;editors&lt;/strong&gt;, &lt;strong&gt;integrated development environments (IDEs)&lt;/strong&gt;, and &lt;strong&gt;AI assistants&lt;/strong&gt; can boost your productivity when writing Python code.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You&amp;rsquo;ll take your first steps with clear examples so you can start coding in Python confidently and build on solid ground.&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 #314: Codemoo: Demonstrating How Coding Agents Work</title>
      <id>https://realpython.com/podcasts/rpp/314/</id>
      <link href="https://realpython.com/podcasts/rpp/314/"/>
      <updated>2026-10-09T12:00:00+00:00</updated>
      <summary>How do you assemble the core pieces of a coding agent? How are developers defining projects through conversation and introspection? This week on the show, Geir Arne Hjelle returns to talk about his recent project to demonstrate how coding agents work under the hood.</summary>
      <content type="html">
        &lt;p&gt;How do you assemble the core pieces of a coding agent? How are developers defining projects through conversation and introspection? This week on the show, Geir Arne Hjelle returns to talk about his recent project to demonstrate how coding agents work under the hood.&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 #313: Python 3.15: Exploring the New Features</title>
      <id>https://realpython.com/podcasts/rpp/313/</id>
      <link href="https://realpython.com/podcasts/rpp/313/"/>
      <updated>2026-10-02T12:00:00+00:00</updated>
      <summary>Python 3.15 is (almost*) here! Christopher Trudeau and Bartosz Zaczyński return to discuss the new version. Bartosz coordinated the series of preview articles with members of the Real Python team and wrote the showcase tutorial, &quot;Python 3.15: Cool New Features for You to Try.&quot; Christopher&#x27;s video course &quot;What&#x27;s New in Python 3.15&quot; covers the topics from the article and shows the new features in action.</summary>
      <content type="html">
        &lt;p&gt;Python 3.15 is (almost*) here! Christopher Trudeau and Bartosz Zaczyński return to discuss the new version. Bartosz coordinated the series of preview articles with members of the Real Python team and wrote the showcase tutorial, &quot;Python 3.15: Cool New Features for You to Try.&quot; Christopher&#x27;s video course &quot;What&#x27;s New in Python 3.15&quot; covers the topics from the article and shows the new features in action.&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 #312: Navigating AI in Open Source: Insights From Wagtail</title>
      <id>https://realpython.com/podcasts/rpp/312/</id>
      <link href="https://realpython.com/podcasts/rpp/312/"/>
      <updated>2026-09-25T12:00:00+00:00</updated>
      <summary>How should you manage AI contributions to an open-source project? How do you measure the impact of using AI tools for development, and what generative features do end users want from a content management system? This week on the show, we speak with Thibaud Colas and Meagen Voss from Wagtail about the complex considerations software organizations are currently facing.</summary>
      <content type="html">
        &lt;p&gt;How should you manage AI contributions to an open-source project? How do you measure the impact of using AI tools for development, and what generative features do end users want from a content management system? This week on the show, we speak with Thibaud Colas and Meagen Voss from Wagtail about the complex considerations software organizations are currently facing.&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>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>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>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: 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: Create Graphical User Interfaces (GUI)</title>
      <id>https://realpython.com/learning-paths/python-gui-programming/</id>
      <link href="https://realpython.com/learning-paths/python-gui-programming/"/>
      <updated>2024-11-14T12:00:00+00:00</updated>
      <summary>Build Python GUI applications with Tkinter, PyQt, wxPython, and Kivy. Learn layouts, event handling, threading, and database integration.</summary>
      <content type="html">
        &lt;p&gt;Build Python GUI applications with Tkinter, PyQt, wxPython, and Kivy. Learn layouts, event handling, threading, and database integration.&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: 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: 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>
  
    <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>
  

</feed>
