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

  
    <entry>
      <title>OpenAI Halves the Price of Its New Everyday AI Model</title>
      <id>https://realpython.com/ai-news-weekly-2026-10-30/</id>
      <link href="https://realpython.com/ai-news-weekly-2026-10-30/"/>
      <updated>2026-10-31T14:00:00+00:00</updated>
      <summary>Real Python&#x27;s weekly AI news for October 24–30, 2026, explained in plain language: Cheaper OpenAI Model, Free Mistral Model, and New Kimi Model.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;&lt;em&gt;Real Python AI News · Weekly edition · The week of October 24–30, 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-92fedd-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-92fedd-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-92fedd-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-92fedd-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-92fedd-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-92fedd-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-92fedd-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-92fedd-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-92fedd-email&quot; required&gt;

  &lt;div class=&quot;invalid-feedback d-block&quot; id=&quot;survey-ai-newsletter-92fedd-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;Powerful AI keeps getting cheaper and easier to download this week, from OpenAI’s half-price model to Mistral’s free one. At the same time, several tests show AI models slipping out of their boxes or building attacks. Here’s the week, explained in plain language.&lt;/p&gt;
&lt;h2 id=&quot;openai-cuts-the-cost-of-handing-office-chores-to-ai&quot;&gt;OpenAI Cuts the Cost of Handing Office Chores to AI&lt;a class=&quot;headerlink&quot; href=&quot;#openai-cuts-the-cost-of-handing-office-chores-to-ai&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-gpt-6-1-terra-framed.da7af9e550fd.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-gpt-6-1-terra-framed.da7af9e550fd.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-gpt-6-1-terra-framed.da7af9e550fd.png 640w, /cdn-cgi/image/width=853,format=auto/https://files.realpython.com/media/s-gpt-6-1-terra-framed.da7af9e550fd.png 853w, /cdn-cgi/image/width=1280,format=auto/https://files.realpython.com/media/s-gpt-6-1-terra-framed.da7af9e550fd.png 1280w, /cdn-cgi/image/width=2560,format=auto/https://files.realpython.com/media/s-gpt-6-1-terra-framed.da7af9e550fd.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 GPT-6.1 Terra | OpenAI&quot; data-asset=&quot;7987&quot;&gt;&lt;/a&gt;&lt;/figure&gt;

&lt;p&gt;Handing a dull office chore to AI pays off only when each run is cheap. OpenAI, maker of &lt;a href=&quot;/ref/ai-coding-tools/chatgpt/&quot; class=&quot;ref-link&quot;&gt;ChatGPT&lt;/a&gt;, now offers &lt;strong&gt;&lt;a href=&quot;https://openai.com/index/introducing-gpt-6-1-terra&quot;&gt;GPT-6.1 Terra&lt;/a&gt;&lt;/strong&gt;, a fast, lower-cost AI &lt;em&gt;model&lt;/em&gt; (the trained system behind an AI assistant). OpenAI pitches it for everyday computer work like filling out forms and editing videos. It’s available in ChatGPT Plus, Pro, Enterprise, and Edu plans and to app developers.&lt;/p&gt;
&lt;p&gt;Developers 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 that’s often part of a word. Terra costs $1 per million tokens it reads and $5 per million it writes, half what the previous GPT-5.6 Terra costs. On the coding test Terminal-Bench 4.0, OpenAI says it solves 50.3 percent of tasks, up from 21.5 percent. You can also see how it did on &lt;a href=&quot;https://realpython.com/ai-benchmark-gpt-6-1-terra/&quot;&gt;Real Python’s own AI benchmark&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;On a test of &lt;em&gt;computer use&lt;/em&gt; (the AI clicking and typing its way through apps), OpenAI says it keeps pace with its top model, GPT-6 Astra, at a tenth of the price. Services offering many AI models list a limit of about 1.05 million tokens per request, with higher rates above 272,000.&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;“Price now matters as much as raw ability in the AI race, and a cheap model that’s good enough can make it practical to hand repetitive paperwork to software. OpenAI says its pricier models remain the better pick for the hardest coding jobs, and all the test results so far are its own.”&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;mistrals-biggest-ai-model-is-now-free-to-download&quot;&gt;Mistral’s Biggest AI Model Is Now Free to Download&lt;a class=&quot;headerlink&quot; href=&quot;#mistrals-biggest-ai-model-is-now-free-to-download&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-mistral-large-4-open-weights-framed.afae32f77ff3.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-mistral-large-4-open-weights-framed.afae32f77ff3.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-mistral-large-4-open-weights-framed.afae32f77ff3.png 640w, /cdn-cgi/image/width=853,format=auto/https://files.realpython.com/media/s-mistral-large-4-open-weights-framed.afae32f77ff3.png 853w, /cdn-cgi/image/width=1280,format=auto/https://files.realpython.com/media/s-mistral-large-4-open-weights-framed.afae32f77ff3.png 1280w, /cdn-cgi/image/width=2560,format=auto/https://files.realpython.com/media/s-mistral-large-4-open-weights-framed.afae32f77ff3.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: Mistral Large 4 (Le Chonk) is now open weight | Mistral&quot; data-asset=&quot;8013&quot;&gt;&lt;/a&gt;&lt;/figure&gt;

&lt;p&gt;Anyone can now download Mistral Large 4, nicknamed &lt;a href=&quot;https://mistral.ai/news/mistral-large-4-oss/&quot;&gt;Le Chonk&lt;/a&gt;, the flagship AI model from the French company Mistral. The company publishes the model’s &lt;a href=&quot;/ref/ai-coding-glossary/weight/&quot; class=&quot;ref-link&quot;&gt;weights&lt;/a&gt;: the numbers a model learns during &lt;a href=&quot;/ref/ai-coding-glossary/training/&quot; class=&quot;ref-link&quot;&gt;training&lt;/a&gt;. With them, people can run the model on their own computers and adapt it. This improved version follows a public preview earlier in October and about three more weeks of training.&lt;/p&gt;
&lt;p&gt;The model has 1 trillion &lt;a href=&quot;/ref/ai-coding-glossary/parameter/&quot; class=&quot;ref-link&quot;&gt;parameters&lt;/a&gt;, another word for those learned numbers. It’s &lt;em&gt;multimodal&lt;/em&gt;, so it understands images as well as text, and Mistral says it handles more than 160 languages. On a coding test from Cognition, a maker of AI coding tools, Mistral reports a leading score of 19.7 percent, compared only with other downloadable models.&lt;/p&gt;
&lt;p&gt;The license allows free use, modification, and development of products built on the model. Only businesses selling the model as an online service need a separate license. Vercel, a company that hosts websites and apps, now offers the improved version through its AI Gateway service at lower prices.&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/ai-news-weekly-2026-10-30/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/ai-news-weekly-2026-10-30/ »&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: Socket Programming in Python</title>
      <id>https://realpython.com/quizzes/socket-programming-in-python/</id>
      <link href="https://realpython.com/quizzes/socket-programming-in-python/"/>
      <updated>2026-10-31T12:00:00+00:00</updated>
      <summary>In this quiz, you&#x27;ll test your understanding of Python sockets. With this knowledge, you&#x27;ll be able to create your own client-server applications, handle multiple connections simultaneously, and send messages and data between endpoints.</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-sockets/&quot;&gt;Socket Programming in Python&lt;/a&gt;. Sockets and the socket API are used to send messages across a network. They provide a form of inter-process communication (IPC).&lt;/p&gt;
&lt;p&gt;The network can be a logical, local network to the computer, or one that&amp;rsquo;s physically connected to an external network, with its own connections to other networks. The obvious example is the internet, which you connect to via your ISP.&lt;/p&gt;
&lt;p&gt;With this quiz, you can check your understanding of the fundamentals of Python sockets. Good luck!&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>Inheritance and Composition: A Python OOP Guide</title>
      <id>https://realpython.com/inheritance-composition-python/</id>
      <link href="https://realpython.com/inheritance-composition-python/"/>
      <updated>2026-10-30T14:00:00+00:00</updated>
      <summary>Learn how inheritance and composition in Python model is-a and has-a relationships, and when to use each to design flexible object-oriented code.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;In Python, understanding inheritance and composition is crucial for effective object-oriented programming. Inheritance allows you to model an &lt;strong&gt;is a&lt;/strong&gt; relationship, where a derived &lt;a href=&quot;/ref/glossary/class/&quot; class=&quot;ref-link&quot;&gt;class&lt;/a&gt; extends the functionality of a base class. Composition, on the other hand, models a &lt;strong&gt;has a&lt;/strong&gt; relationship, where a class contains &lt;a href=&quot;/ref/glossary/object/&quot; class=&quot;ref-link&quot;&gt;objects&lt;/a&gt; of other classes to build complex structures. Both techniques promote code reuse, but they approach it differently.&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;Composition and inheritance&lt;/strong&gt; in Python model relationships between classes, enabling code reuse in different ways.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Composition&lt;/strong&gt; is achieved by creating classes that contain objects of other classes, allowing for flexible designs.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Inheritance&lt;/strong&gt; models an &lt;strong&gt;is a&lt;/strong&gt; relationship, allowing derived classes to extend base class functionality.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Inheritance&lt;/strong&gt; in Python is achieved by defining classes that derive from base classes, inheriting their interface and implementation.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Exploring the differences between inheritance and composition helps you choose the right approach for designing robust, maintainable Python applications. Understanding how and when to apply each concept is key to leveraging the full power of Python’s object-oriented programming capabilities.&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/inheritance-composition-python-code/&quot; class=&quot;alert-link&quot; data-bs-toggle=&quot;modal&quot; data-bs-target=&quot;#modal-inheritance-composition-python-code&quot; markdown&gt;Click here to get the free sample code&lt;/a&gt; that shows you how to use inheritance and composition in Python.&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 “Inheritance and Composition: A Python OOP Guide” 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/inheritance-composition-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;Inheritance and Composition: A Python OOP Guide&quot; src=&quot;https://files.realpython.com/media/Inheritance-vs-Composition-in-Python_Watermarked_1.aec726368a97.jpg&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/Inheritance-vs-Composition-in-Python_Watermarked_1.aec726368a97.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/Inheritance-vs-Composition-in-Python_Watermarked_1.aec726368a97.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/Inheritance-vs-Composition-in-Python_Watermarked_1.aec726368a97.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/Inheritance-vs-Composition-in-Python_Watermarked_1.aec726368a97.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/inheritance-composition-python/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;Inheritance and Composition: A Python OOP Guide&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;In this quiz, you&#x27;ll test your understanding of inheritance and composition in Python. These are two major concepts in object-oriented programming that help model the relationship between two classes. By working through this quiz, you&#x27;ll revisit how to use inheritance and composition in Python, model class hierarchies, and use multiple inheritance.&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;Object-Oriented Python Live Course:&lt;/strong&gt; Want to practice choosing between inheritance and composition in a real design? In Real Python’s &lt;a href=&quot;https://realpython.com/workshops/python-oop/&quot;&gt;Object-Oriented Python&lt;/a&gt; live course, you build a complete simulator with an instructor and decide where each relationship belongs as the project grows. Join the waitlist to hear about the next dates.&lt;/p&gt;
&lt;/div&gt;
&lt;h2 id=&quot;what-are-inheritance-and-composition&quot;&gt;What Are Inheritance and Composition?&lt;a class=&quot;headerlink&quot; href=&quot;#what-are-inheritance-and-composition&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Inheritance&lt;/strong&gt; and &lt;strong&gt;composition&lt;/strong&gt; are two major concepts in object-oriented programming that model the relationship between two classes. They drive the design of an application and determine how the application should evolve as new features are added or requirements change.&lt;/p&gt;
&lt;p&gt;Both of them enable code reuse, but they do it in different ways.&lt;/p&gt;
&lt;h3 id=&quot;whats-inheritance&quot;&gt;What’s Inheritance?&lt;a class=&quot;headerlink&quot; href=&quot;#whats-inheritance&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Inheritance&lt;/strong&gt; models what’s called an &lt;strong&gt;is a&lt;/strong&gt; relationship. This means that when you have a &lt;code&gt;Derived&lt;/code&gt; class that inherits from a &lt;code&gt;Base&lt;/code&gt; class, you’ve created a relationship where &lt;code&gt;Derived&lt;/code&gt; &lt;strong&gt;is a&lt;/strong&gt; specialized version of &lt;code&gt;Base&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Inheritance is represented using the &lt;a href=&quot;https://www.omg.org/uml/&quot;&gt;Unified Modeling Language&lt;/a&gt;, or UML, in the following way:&lt;/p&gt;
&lt;figure class=&quot;js-lightbox&quot;&gt;&lt;a href=&quot;https://files.realpython.com/media/ic-basic-inheritance.f8dc9ffee4d7.jpg&quot; target=&quot;_blank&quot;&gt;&lt;img loading=&quot;lazy&quot; class=&quot;img-fluid mx-auto d-block w-33&quot; src=&quot;https://files.realpython.com/media/ic-basic-inheritance.f8dc9ffee4d7.jpg&quot; width=&quot;242&quot; height=&quot;343&quot; srcset=&quot;/cdn-cgi/image/width=60,format=auto/https://files.realpython.com/media/ic-basic-inheritance.f8dc9ffee4d7.jpg 60w, /cdn-cgi/image/width=80,format=auto/https://files.realpython.com/media/ic-basic-inheritance.f8dc9ffee4d7.jpg 80w, /cdn-cgi/image/width=121,format=auto/https://files.realpython.com/media/ic-basic-inheritance.f8dc9ffee4d7.jpg 121w, /cdn-cgi/image/width=242,format=auto/https://files.realpython.com/media/ic-basic-inheritance.f8dc9ffee4d7.jpg 242w&quot; sizes=&quot;(min-width: 1200px) 690px, (min-width: 780px) calc(-5vw + 669px), (min-width: 580px) 510px, calc(100vw - 30px)&quot; alt=&quot;Basic inheritance between Base and Derived classes&quot; data-asset=&quot;1494&quot;&gt;&lt;/a&gt;&lt;/figure&gt;

&lt;p&gt;This model represents classes as boxes with the class name on top. It represents the inheritance relationship with an arrow from the derived class pointing to the base class. The word &lt;strong&gt;extends&lt;/strong&gt; is usually added to the arrow.&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; In an inheritance relationship:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Classes that inherit from another are called derived classes, subclasses, or subtypes.&lt;/li&gt;
&lt;li&gt;Classes from which other classes are derived are called base classes or super classes.&lt;/li&gt;
&lt;li&gt;A derived class is said to derive, inherit, or extend a base class.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;p&gt;Say you have the base class &lt;code&gt;Animal&lt;/code&gt;, and you derive from it to create a &lt;code&gt;Horse&lt;/code&gt; class. The inheritance relationship states that &lt;code&gt;Horse&lt;/code&gt; &lt;strong&gt;is an&lt;/strong&gt; &lt;code&gt;Animal&lt;/code&gt;. This means that &lt;code&gt;Horse&lt;/code&gt; inherits the &lt;a href=&quot;https://realpython.com/python-interface/&quot;&gt;interface&lt;/a&gt; and implementation of &lt;code&gt;Animal&lt;/code&gt;, and you can use &lt;code&gt;Horse&lt;/code&gt; objects to replace &lt;code&gt;Animal&lt;/code&gt; objects in the application.&lt;/p&gt;
&lt;p&gt;This is known as the &lt;a href=&quot;https://realpython.com/solid-principles-python/#liskov-substitution-principle-lsp&quot;&gt;Liskov substitution principle&lt;/a&gt;. The principle states that if &lt;code&gt;S&lt;/code&gt; is a subtype of &lt;code&gt;T&lt;/code&gt;, then replacing objects of type &lt;code&gt;T&lt;/code&gt; with objects of type &lt;code&gt;S&lt;/code&gt; doesn’t change the program’s behavior.&lt;/p&gt;
&lt;p&gt;You’ll see in this tutorial why you should always follow the Liskov substitution principle when creating your class hierarchies, and you’ll learn about the problems that you’ll run into if you don’t.&lt;/p&gt;
&lt;h3 id=&quot;whats-composition&quot;&gt;What’s Composition?&lt;a class=&quot;headerlink&quot; href=&quot;#whats-composition&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Composition&lt;/strong&gt; is a concept that models a &lt;strong&gt;has a&lt;/strong&gt; relationship. It enables creating complex types by combining objects of other types. This means that a class &lt;code&gt;Composite&lt;/code&gt; can contain an object of another class &lt;code&gt;Component&lt;/code&gt;. This relationship means that a &lt;code&gt;Composite&lt;/code&gt; &lt;strong&gt;has a&lt;/strong&gt; &lt;code&gt;Component&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;UML represents composition as follows:&lt;/p&gt;
&lt;figure class=&quot;js-lightbox&quot;&gt;&lt;a href=&quot;https://files.realpython.com/media/ic-basic-composition.8a15876f7db2.jpg&quot; target=&quot;_blank&quot;&gt;&lt;img loading=&quot;lazy&quot; class=&quot;img-fluid mx-auto d-block w-33&quot; src=&quot;https://files.realpython.com/media/ic-basic-composition.8a15876f7db2.jpg&quot; width=&quot;249&quot; height=&quot;348&quot; srcset=&quot;/cdn-cgi/image/width=62,format=auto/https://files.realpython.com/media/ic-basic-composition.8a15876f7db2.jpg 62w, /cdn-cgi/image/width=83,format=auto/https://files.realpython.com/media/ic-basic-composition.8a15876f7db2.jpg 83w, /cdn-cgi/image/width=124,format=auto/https://files.realpython.com/media/ic-basic-composition.8a15876f7db2.jpg 124w, /cdn-cgi/image/width=249,format=auto/https://files.realpython.com/media/ic-basic-composition.8a15876f7db2.jpg 249w&quot; sizes=&quot;(min-width: 1200px) 690px, (min-width: 780px) calc(-5vw + 669px), (min-width: 580px) 510px, calc(100vw - 30px)&quot; alt=&quot;Basic composition between Composite and Component classes&quot; data-asset=&quot;1493&quot;&gt;&lt;/a&gt;&lt;/figure&gt;

&lt;p&gt;The model represents composition through a line that starts with a diamond at the composite class and points to the component class. The composite side can express the cardinality of the relationship. The &lt;strong&gt;cardinality&lt;/strong&gt; indicates the number or the valid range of &lt;code&gt;Component&lt;/code&gt; &lt;a href=&quot;/ref/glossary/instance/&quot; class=&quot;ref-link&quot;&gt;instances&lt;/a&gt; that the &lt;code&gt;Composite&lt;/code&gt; class will contain.&lt;/p&gt;
&lt;p&gt;In the diagram above, the &lt;code&gt;1&lt;/code&gt; represents that the &lt;code&gt;Composite&lt;/code&gt; class contains one object of type &lt;code&gt;Component&lt;/code&gt;. You can express cardinality in the following ways:&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/inheritance-composition-python/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/inheritance-composition-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>GPT-6.1 Terra Draws a Python Reading a Book</title>
      <id>https://realpython.com/ai-benchmark-gpt-6-1-terra/</id>
      <link href="https://realpython.com/ai-benchmark-gpt-6-1-terra/"/>
      <updated>2026-10-30T14:00:00+00:00</updated>
      <summary>Explore GPT-6.1 Terra&#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.1 Terra&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.5db43f63704e.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.5db43f63704e.png&quot; width=&quot;784&quot; height=&quot;634&quot; srcset=&quot;/cdn-cgi/image/width=196,format=auto/https://files.realpython.com/media/turtle.5db43f63704e.png 196w, /cdn-cgi/image/width=261,format=auto/https://files.realpython.com/media/turtle.5db43f63704e.png 261w, /cdn-cgi/image/width=392,format=auto/https://files.realpython.com/media/turtle.5db43f63704e.png 392w, /cdn-cgi/image/width=784,format=auto/https://files.realpython.com/media/turtle.5db43f63704e.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.1 Terra.&quot; data-asset=&quot;8018&quot;&gt;&lt;/a&gt;&lt;/figure&gt;

&lt;div class=&quot;card mb-3&quot; id=&quot;collapse_card226299&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;#collapse226299&quot; aria-expanded=&quot;false&quot; aria-controls=&quot;collapse226299&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_card226299&quot; id=&quot;collapse226299&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.7ec834dd7531.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.7ec834dd7531.gif&quot; width=&quot;784&quot; height=&quot;634&quot; srcset=&quot;/cdn-cgi/image/width=196,format=auto/https://files.realpython.com/media/turtle.7ec834dd7531.gif 196w, /cdn-cgi/image/width=261,format=auto/https://files.realpython.com/media/turtle.7ec834dd7531.gif 261w, /cdn-cgi/image/width=392,format=auto/https://files.realpython.com/media/turtle.7ec834dd7531.gif 392w, /cdn-cgi/image/width=784,format=auto/https://files.realpython.com/media/turtle.7ec834dd7531.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.1 Terra drawing a python reading a book.&quot; data-asset=&quot;8019&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_card2424bc&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;#collapse2424bc&quot; aria-expanded=&quot;false&quot; aria-controls=&quot;collapse2424bc&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_card2424bc&quot; id=&quot;collapse2424bc&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;2853 drawing commands, 110 lines of code&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;How modern its Python is&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Python 3.10&lt;/strong&gt; (2021)&lt;/td&gt;
&lt;td&gt;pinned by &lt;code&gt;datetime_utc&lt;/code&gt;. Newest feature used: Python 3.11&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Modern idioms&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;6 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.5&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;0 of 10&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;left every unrelated spot alone&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;Sidestepped it&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;showed a real alternative without saying the function is made up&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;2.6k 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.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;1 min 16 s&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;6.3k output tokens&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;card mb-3&quot; id=&quot;collapse_carde6aab5&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;#collapsee6aab5&quot; aria-expanded=&quot;false&quot; aria-controls=&quot;collapsee6aab5&quot; markdown&gt;&lt;span class=&quot;float-start&quot; markdown&gt;Run settings&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_carde6aab5&quot; id=&quot;collapsee6aab5&quot;&gt;
&lt;div class=&quot;card-body&quot;&gt;
&lt;p&gt;The run: &lt;code&gt;openai/gpt-6.1-terra&lt;/code&gt; via OpenRouter, at its default reasoning settings, with no system prompt and the returned code left unchanged.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/ai-benchmark-gpt-6-1-terra/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/ai-benchmark-gpt-6-1-terra/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
        
      </content>
    </entry>
  
    <entry>
      <title>Python range(): Represent Numerical Ranges</title>
      <id>https://realpython.com/python-range/</id>
      <link href="https://realpython.com/python-range/"/>
      <updated>2026-10-30T14:00:00+00:00</updated>
      <summary>Master the Python range() function, see how it works under the hood, and learn when enumerate() or zip() beat ranges in your loops.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;In Python, the &lt;code&gt;range()&lt;/code&gt; function generates a &lt;a href=&quot;/ref/glossary/sequence/&quot; class=&quot;ref-link&quot;&gt;sequence&lt;/a&gt; of numbers, often used in loops for &lt;a href=&quot;/ref/glossary/iteration/&quot; class=&quot;ref-link&quot;&gt;iteration&lt;/a&gt;. By default, it creates numbers starting from 0 up to but not including a specified stop value. You can also reverse the sequence with &lt;code&gt;reversed()&lt;/code&gt;. If you need to count backwards, then you can use a negative step, like &lt;code&gt;range(start, stop, -1)&lt;/code&gt;, which counts down from &lt;code&gt;start&lt;/code&gt; to &lt;code&gt;stop&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;range()&lt;/code&gt; function is not just about iterating over numbers. It can also be used in various programming scenarios beyond simple loops. By mastering &lt;code&gt;range()&lt;/code&gt;, you can write more efficient and readable Python code. Explore how &lt;code&gt;range()&lt;/code&gt; can simplify your code and when alternatives might be more appropriate.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;By the end of this tutorial, you’ll understand that:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A range in Python is an &lt;a href=&quot;/ref/glossary/object/&quot; class=&quot;ref-link&quot;&gt;object&lt;/a&gt; representing an &lt;strong&gt;interval of integers&lt;/strong&gt;, often used for looping.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;range()&lt;/code&gt; function can be used to &lt;strong&gt;generate sequences&lt;/strong&gt; of numbers that can be &lt;strong&gt;converted to lists&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;for i in range(5)&lt;/code&gt; is a &lt;a href=&quot;/ref/glossary/loop/&quot; class=&quot;ref-link&quot;&gt;loop&lt;/a&gt; that &lt;strong&gt;iterates&lt;/strong&gt; over the numbers from 0 to 4, inclusive.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;range parameters&lt;/strong&gt; &lt;code&gt;start&lt;/code&gt;, &lt;code&gt;stop&lt;/code&gt;, and &lt;code&gt;step&lt;/code&gt; define where the sequence begins, ends, and the interval between numbers.&lt;/li&gt;
&lt;li&gt;Ranges can go &lt;strong&gt;backward&lt;/strong&gt; in Python by using a negative step value and &lt;strong&gt;reversed&lt;/strong&gt; by using &lt;code&gt;reversed()&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;A range is a Python object that represents an interval of integers. Usually, the numbers are consecutive, but you can also specify that you want to space them out. You can create ranges by calling &lt;code&gt;range()&lt;/code&gt; with one, two, or three &lt;a href=&quot;/ref/glossary/argument/&quot; class=&quot;ref-link&quot;&gt;arguments&lt;/a&gt;, as the following examples show:&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;nb&quot;&gt;list&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;range&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;[0, 1, 2, 3, 4]&lt;/span&gt;

&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;list&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;range&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;[1, 2, 3, 4, 5, 6]&lt;/span&gt;

&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;list&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;range&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;20&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;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, 3, 5, 7, 9, 11, 13, 15, 17, 19]&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 each example, you use &lt;a href=&quot;https://realpython.com/python-list/#using-the-list-constructor&quot;&gt;&lt;code&gt;list()&lt;/code&gt;&lt;/a&gt; to explicitly list the individual elements of each range. You’ll study these examples in more detail later on.&lt;/p&gt;
&lt;p&gt;A range can be an effective tool. However, throughout this tutorial, you’ll also explore alternatives that may work better in some situations. You can click the link below to download the code that you’ll see in this tutorial:&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-range-code/&quot; class=&quot;alert-link&quot; data-bs-toggle=&quot;modal&quot; data-bs-target=&quot;#modal-python-range-code&quot; markdown&gt;Click here to download the free range() sample code&lt;/a&gt; that shows you how to represent numerical ranges in Python.&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;Python for Beginners Live Course:&lt;/strong&gt; Want more practice with loops, ranges, and the rest of Python’s building blocks? In Real Python’s &lt;a href=&quot;https://realpython.com/workshops/python-for-beginners/&quot;&gt;Python for Beginners&lt;/a&gt; live course, you build real programs with an instructor and a small group of fellow learners. Join the waitlist to hear about the next dates.&lt;/p&gt;
&lt;/div&gt;
&lt;h2 id=&quot;construct-numerical-ranges&quot;&gt;Construct Numerical Ranges&lt;a class=&quot;headerlink&quot; href=&quot;#construct-numerical-ranges&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;In Python, &lt;code&gt;range()&lt;/code&gt; is &lt;strong&gt;built in&lt;/strong&gt;. This means that you can always call &lt;code&gt;range()&lt;/code&gt; without doing any preparations first. Calling &lt;code&gt;range()&lt;/code&gt; constructs a &lt;strong&gt;range object&lt;/strong&gt; that you can put to use. Later, you’ll see practical examples of how to use range objects.&lt;/p&gt;
&lt;p&gt;You can provide &lt;code&gt;range()&lt;/code&gt; with one, two, or three &lt;strong&gt;integer&lt;/strong&gt; arguments. This corresponds to three different use cases:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Ranges counting from zero&lt;/li&gt;
&lt;li&gt;Ranges of consecutive numbers&lt;/li&gt;
&lt;li&gt;Ranges stepping over numbers&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;You’ll learn how to use each of these next.&lt;/p&gt;
&lt;h3 id=&quot;count-from-zero&quot;&gt;Count From Zero&lt;a class=&quot;headerlink&quot; href=&quot;#count-from-zero&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;When you call &lt;code&gt;range()&lt;/code&gt; with one argument, you create a range that counts from zero and up to, but not including, the number you provided:&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;nb&quot;&gt;range&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;range(0, 5)&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, you’ve created a range from zero to five. To see the individual elements in the range, you can use &lt;code&gt;list()&lt;/code&gt; to convert the range to a &lt;a href=&quot;https://realpython.com/python-list/&quot;&gt;list&lt;/a&gt;:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;pycon&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--blue&quot;&gt;
    &lt;span class=&quot;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Language: &lt;/span&gt;Python&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; aria-label=&quot;Toggle prompts and output&quot; role=&quot;button&quot; tabindex=&quot;0&quot;&gt;&lt;span class=&quot;icon baseline js-codeblock-output-on codeblock__header--icon-lower&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.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;nb&quot;&gt;list&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;range&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;[0, 1, 2, 3, 4]&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;Inspecting &lt;code&gt;range(5)&lt;/code&gt; shows that it contains the numbers zero, one, two, three, and four. Five itself is not a part of the range. One nice property of these ranges is that the argument, &lt;code&gt;5&lt;/code&gt; in this case, is the same as the number of elements in the range.&lt;/p&gt;
&lt;h3 id=&quot;count-from-start-to-stop&quot;&gt;Count From Start to Stop&lt;a class=&quot;headerlink&quot; href=&quot;#count-from-start-to-stop&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;You can call &lt;code&gt;range()&lt;/code&gt; with two arguments. The first value will be the start of the range. As before, the range will count up to, but not include, the second value:&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;nb&quot;&gt;range&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;mi&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;range(1, 7)&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 representation of a range object just shows you the arguments that you provided, so it’s not super helpful in this case. You can use &lt;code&gt;list()&lt;/code&gt; to inspect the individual elements:&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python-range/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-range/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
        
      </content>
    </entry>
  
    <entry>
      <title>Python&#x27;s Requests Library (Guide)</title>
      <id>https://realpython.com/python-requests/</id>
      <link href="https://realpython.com/python-requests/"/>
      <updated>2026-10-30T14:00:00+00:00</updated>
      <summary>The Requests library is the go-to tool for making HTTP requests in Python. Learn how to use its intuitive API to send requests and interact with the web.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;The &lt;a href=&quot;https://requests.readthedocs.io/en/latest/&quot;&gt;Requests&lt;/a&gt; library is the go-to &lt;a href=&quot;/ref/glossary/package/&quot; class=&quot;ref-link&quot;&gt;package&lt;/a&gt; for making HTTP requests in Python. It abstracts the complexities of making requests behind an intuitive &lt;a href=&quot;/ref/glossary/api/&quot; class=&quot;ref-link&quot;&gt;API&lt;/a&gt;. Though not part of Python’s standard library, it’s worth considering Requests to perform HTTP actions like GET, POST, and more.&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;Requests is not a built-in&lt;/strong&gt; Python module—it’s a third-party library that you must install separately.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;You make a GET request&lt;/strong&gt; in Python using &lt;code&gt;requests.get()&lt;/code&gt; with the desired URL.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;To add headers to requests&lt;/strong&gt;, pass a dictionary of headers to the &lt;code&gt;headers&lt;/code&gt; parameter in your request.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;To send POST data&lt;/strong&gt;, use the &lt;code&gt;data&lt;/code&gt; parameter for form-encoded data or the &lt;code&gt;json&lt;/code&gt; parameter for JSON data.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;response.text&lt;/code&gt; gives you a string&lt;/strong&gt; representation of the response content, while &lt;strong&gt;&lt;code&gt;response.content&lt;/code&gt; provides raw bytes&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This tutorial guides you through customizing requests with headers and data, handling responses, authentication, and optimizing performance using sessions and retries.&lt;/p&gt;
&lt;p&gt;If you want to explore the code examples that you’ll see in this tutorial, then you can download them here:&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown&gt;Get Your Code:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/python-requests-code/&quot; class=&quot;alert-link&quot; data-bs-toggle=&quot;modal&quot; data-bs-target=&quot;#modal-python-requests-code&quot; markdown&gt;Click here to download the ready-to-run Requests sample code&lt;/a&gt; that shows you how to use Python’s Requests library.&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 “Python&#x27;s Requests Library” 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-requests/&quot; tabindex=&quot;-1&quot;&gt;
        &lt;div class=&quot;ratio ratio-16x9&quot;&gt;

            &lt;img class=&quot;card-img-top m-0 p-0 rounded&quot; style=&quot;object-fit: contain; background: #abe5b2;&quot; alt=&quot;Python’s Requests Library (Guide)&quot; src=&quot;https://files.realpython.com/media/Python-Requests-Library-Tutorial_Watermarked.3c9dfdc7b014.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-Requests-Library-Tutorial_Watermarked.3c9dfdc7b014.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/Python-Requests-Library-Tutorial_Watermarked.3c9dfdc7b014.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/Python-Requests-Library-Tutorial_Watermarked.3c9dfdc7b014.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/Python-Requests-Library-Tutorial_Watermarked.3c9dfdc7b014.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-requests/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;Python&#x27;s Requests Library&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;Test your understanding of the Python Requests library for making HTTP requests and interacting with web services.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;

&lt;h2 id=&quot;get-started-with-pythons-requests-library&quot;&gt;Get Started With Python’s Requests Library&lt;a class=&quot;headerlink&quot; href=&quot;#get-started-with-pythons-requests-library&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Even though the Requests library is a common staple for many Python developers, it’s not included in Python’s &lt;a href=&quot;/ref/glossary/standard-library/&quot; class=&quot;ref-link&quot;&gt;standard library&lt;/a&gt;. That way, the library can continue to evolve more freely as a self-standing project.&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’re looking to make HTTP requests with Python’s standard library only, then &lt;a href=&quot;https://realpython.com/urllib-request/&quot;&gt;Python’s &lt;code&gt;urllib.request&lt;/code&gt;&lt;/a&gt; is a good choice for you.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Since Requests is a third-party library, you need to install it before using it in your code. As a good practice, you should install external packages into a &lt;a href=&quot;https://realpython.com/python-virtual-environments-a-primer/&quot;&gt;virtual environment&lt;/a&gt;, but you may choose to install &lt;code&gt;requests&lt;/code&gt; into your global environment if you plan to use it across multiple projects.&lt;/p&gt;
&lt;p&gt;Whether you’re working in a &lt;a href=&quot;/ref/glossary/virtual-environment/&quot; class=&quot;ref-link&quot;&gt;virtual environment&lt;/a&gt; or not, you’ll need to install &lt;code&gt;requests&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;python&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;-m&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;pip&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;install&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;requests&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;2&lt;/span&gt;.32.4
&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;Once &lt;a href=&quot;https://realpython.com/what-is-pip/&quot;&gt;&lt;code&gt;pip&lt;/code&gt;&lt;/a&gt; finishes installing &lt;code&gt;requests&lt;/code&gt;, you can use it in your application. Importing &lt;code&gt;requests&lt;/code&gt; looks like this:&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;kn&quot;&gt;import&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nn&quot;&gt;requests&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;Now that you’re all set up, it’s time to begin your journey with Requests. Your first goal will be to make a &lt;code&gt;GET&lt;/code&gt; request.&lt;/p&gt;
&lt;h2 id=&quot;make-a-get-request&quot;&gt;Make a GET Request&lt;a class=&quot;headerlink&quot; href=&quot;#make-a-get-request&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods&quot;&gt;HTTP methods&lt;/a&gt;, such as &lt;code&gt;GET&lt;/code&gt; and &lt;code&gt;POST&lt;/code&gt;, specify the action you want to perform when making an HTTP request. In addition to &lt;code&gt;GET&lt;/code&gt; and &lt;code&gt;POST&lt;/code&gt;, there are several other common methods that you’ll use later in this tutorial.&lt;/p&gt;
&lt;p&gt;One of the most commonly used HTTP methods is &lt;code&gt;GET&lt;/code&gt;, which retrieves data from a specified resource. To make a &lt;code&gt;GET&lt;/code&gt; request using Requests, you can invoke &lt;code&gt;requests.get()&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;To try this out, you can make a &lt;code&gt;GET&lt;/code&gt; request to &lt;a href=&quot;https://docs.github.com/en/rest&quot;&gt;GitHub’s REST API&lt;/a&gt; by calling &lt;code&gt;get()&lt;/code&gt; with the following URL:&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;requests&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;requests&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;https://api.github.com&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&amp;lt;Response [200]&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot; aria-label=&quot;Copy to clipboard&quot;&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.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;Congratulations! You’ve made your first request. Now you’ll dive a little deeper into the response of that request.&lt;/p&gt;
&lt;h2 id=&quot;inspect-the-response&quot;&gt;Inspect the Response&lt;a class=&quot;headerlink&quot; href=&quot;#inspect-the-response&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;A &lt;code&gt;Response&lt;/code&gt; is the &lt;a href=&quot;/ref/glossary/object/&quot; class=&quot;ref-link&quot;&gt;object&lt;/a&gt; that contains the results of your request. Try making that same request again, but this time store the return value in a &lt;a href=&quot;https://realpython.com/python-variables/&quot;&gt;variable&lt;/a&gt; so you can get a closer look at its &lt;a href=&quot;/ref/glossary/attribute/&quot; class=&quot;ref-link&quot;&gt;attributes&lt;/a&gt; and behaviors:&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;requests&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;response&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;requests&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;https://api.github.com&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot; aria-label=&quot;Copy to clipboard&quot;&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.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;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python-requests/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-requests/ »&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 Write Beautiful Python Code With PEP 8</title>
      <id>https://realpython.com/python-pep8/</id>
      <link href="https://realpython.com/python-pep8/"/>
      <updated>2026-10-30T14:00:00+00:00</updated>
      <summary>Learn how to write readable, high-quality Python code by following the PEP 8 style guide and using linters and autoformatters to enforce it.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;PEP 8, sometimes spelled PEP8 or PEP-8, is the official style guide for Python code. PEP 8 gives guidelines on naming conventions, code layout, and other best practices. &lt;a href=&quot;/ref/glossary/guido-van-rossum/&quot; class=&quot;ref-link&quot;&gt;Guido van Rossum&lt;/a&gt;, Barry Warsaw, and Alyssa Coghlan wrote it in 2001 with a focus on enhancing code readability and consistency. By adhering to PEP 8, you ensure that your Python code is readable and maintainable, which helps with collaboration and professional development.&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;PEP 8 is a guide for writing &lt;strong&gt;clean, readable, and consistent&lt;/strong&gt; Python code.&lt;/li&gt;
&lt;li&gt;PEP 8 is &lt;strong&gt;still relevant&lt;/strong&gt; in modern Python development.&lt;/li&gt;
&lt;li&gt;Following PEP 8 is &lt;strong&gt;recommended for all Python developers&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Python uses &lt;strong&gt;&lt;a href=&quot;/ref/glossary/snake-case/&quot; class=&quot;ref-link&quot;&gt;snake case&lt;/a&gt; for variable names&lt;/strong&gt;—lowercase words separated by underscores.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Python function names&lt;/strong&gt; should also use &lt;strong&gt;snake case&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Class names&lt;/strong&gt; in Python use &lt;strong&gt;&lt;a href=&quot;/ref/glossary/camel-case/&quot; class=&quot;ref-link&quot;&gt;camel case&lt;/a&gt;&lt;/strong&gt;, with each word starting with a capital letter.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;PEP stands for &lt;a href=&quot;/ref/glossary/pep/&quot; class=&quot;ref-link&quot;&gt;Python Enhancement Proposal&lt;/a&gt;, and there are &lt;a href=&quot;https://peps.python.org/&quot;&gt;many PEPs&lt;/a&gt;. These documents primarily describe new features proposed for the Python language, but some PEPs also focus on design and style and aim to serve as a resource for the community. &lt;a href=&quot;/ref/glossary/pep-8/&quot; class=&quot;ref-link&quot;&gt;PEP 8&lt;/a&gt; is one of these style-focused PEPs.&lt;/p&gt;
&lt;p&gt;In this tutorial, you’ll cover the key guidelines laid out in PEP 8 and explore beginner to intermediate programming topics. You can learn about more advanced topics by reading the full &lt;a href=&quot;https://www.python.org/dev/peps/pep-0008/&quot;&gt;PEP 8&lt;/a&gt; documentation.&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-pep8-code/&quot; class=&quot;alert-link&quot; data-bs-toggle=&quot;modal&quot; data-bs-target=&quot;#modal-python-pep8-code&quot; markdown&gt;Click here to grab the free PEP 8 example code&lt;/a&gt; that shows you how to write PEP 8 compliant code.&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 Write Beautiful Python Code With PEP 8” 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-pep8/&quot; tabindex=&quot;-1&quot;&gt;
        &lt;div class=&quot;ratio ratio-16x9&quot;&gt;

            &lt;img class=&quot;card-img-top m-0 p-0 rounded&quot; style=&quot;object-fit: contain; background: #abe5b2;&quot; alt=&quot;How to Write Beautiful Python Code With PEP 8&quot; src=&quot;https://files.realpython.com/media/PEP-8-Tutorial-Python-Code-Formatting-Guide_Watermarked.9103cf7be328.jpg&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/PEP-8-Tutorial-Python-Code-Formatting-Guide_Watermarked.9103cf7be328.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/PEP-8-Tutorial-Python-Code-Formatting-Guide_Watermarked.9103cf7be328.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/PEP-8-Tutorial-Python-Code-Formatting-Guide_Watermarked.9103cf7be328.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/PEP-8-Tutorial-Python-Code-Formatting-Guide_Watermarked.9103cf7be328.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-pep8/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;How to Write Beautiful Python Code With PEP 8&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;In this quiz, you&#x27;ll test your understanding of PEP 8, the Python Enhancement Proposal that provides guidelines and best practices on how to write Python code. By working through this quiz, you&#x27;ll revisit the key guidelines laid out in PEP 8 and how to set up your development environment to write PEP 8 compliant Python code.&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;Intermediate Python Deep Dive Live Course:&lt;/strong&gt; Want to go beyond style rules to writing truly Pythonic code? In Real Python’s &lt;a href=&quot;https://realpython.com/workshops/intermediate-deep-dive/&quot;&gt;Intermediate Python Deep Dive&lt;/a&gt; live course, you work on Pythonic design and clean code with an instructor and get feedback on what you write. Join the waitlist to hear about the next dates.&lt;/p&gt;
&lt;/div&gt;
&lt;h2 id=&quot;why-we-need-pep-8&quot;&gt;Why We Need PEP 8&lt;a class=&quot;headerlink&quot; href=&quot;#why-we-need-pep-8&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;“Readability counts.”&lt;/p&gt;
&lt;p&gt;— The &lt;a href=&quot;/ref/glossary/zen-of-python/&quot; class=&quot;ref-link&quot;&gt;Zen of Python&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;PEP 8 exists to improve the readability of Python code. But why is readability so important? Why is writing readable code one of the guiding principles of the Python language, according to the &lt;a href=&quot;https://realpython.com/zen-of-python/&quot;&gt;Zen of Python&lt;/a&gt;?&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; You may encounter the term &lt;em&gt;Pythonic&lt;/em&gt; when the Python community refers to code that follows the idiomatic writing style specific to Python. &lt;a href=&quot;https://realpython.com/learning-paths/writing-pythonic-code/&quot;&gt;Pythonic code&lt;/a&gt; adheres to Python’s design principles and philosophy and emphasizes readability, simplicity, and clarity.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;As Guido van Rossum said, “Code is read much more often than it’s written.” You may spend a few minutes, or a whole day, writing a piece of code to process user authentication. Once you’ve written it, you’re never going to write it again.&lt;/p&gt;
&lt;p&gt;But you’ll definitely have to read it again. That piece of code might remain part of a project you’re working on. Every time you go back to that file, you’ll have to remember what that code does and why you wrote it, so readability matters.&lt;/p&gt;
&lt;p&gt;It can be difficult to remember what a piece of code does a few days, or weeks, after you wrote it.&lt;/p&gt;
&lt;p&gt;If you follow PEP 8, you can be sure that you’ve &lt;a href=&quot;#naming-conventions&quot;&gt;named&lt;/a&gt; your &lt;a href=&quot;https://realpython.com/python-variables/&quot;&gt;variables&lt;/a&gt; well. You’ll know that you’ve added &lt;a href=&quot;#whitespace-in-expressions-and-statements&quot;&gt;enough whitespace&lt;/a&gt; so it’s easier to follow logical steps in your code. You’ll also have &lt;a href=&quot;#comments&quot;&gt;commented&lt;/a&gt; your code well. All of this will mean your code is more readable and easier to come back to. If you’re a beginner, following the rules of PEP 8 can make learning Python a much more pleasant task.&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; Following PEP 8 is particularly important if you’re looking for a development job. Writing clear, readable code shows professionalism. It’ll tell an employer that you understand how to structure your code well.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;If you have more experience writing Python code, then you may need to collaborate with others. Writing readable code here is crucial. Other people, who may have never met you or seen your coding style before, will have to read and understand your code. Having guidelines that you follow and recognize will make it  easier for others to read your code.&lt;/p&gt;
&lt;h2 id=&quot;naming-conventions&quot;&gt;Naming Conventions&lt;a class=&quot;headerlink&quot; href=&quot;#naming-conventions&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;“Explicit is better than implicit.”&lt;/p&gt;
&lt;p&gt;— The Zen of Python&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;When you write Python code, you have to name a lot of things: variables, &lt;a href=&quot;https://realpython.com/defining-your-own-python-function/&quot;&gt;functions&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python-classes/&quot;&gt;classes&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/pypi-publish-python-package/&quot;&gt;packages&lt;/a&gt;, and so on. Choosing sensible names will save you time and energy later. You’ll be able to figure out, from the name, what a certain variable, function, or class represents. You’ll also avoid using potentially confusing names that might result in errors that are difficult to debug.&lt;/p&gt;
&lt;p&gt;One suggestion is to never use &lt;code&gt;l&lt;/code&gt;, &lt;code&gt;O&lt;/code&gt;, or &lt;code&gt;I&lt;/code&gt; single letter names as these can be mistaken for &lt;code&gt;1&lt;/code&gt; and &lt;code&gt;0&lt;/code&gt;, depending on what &lt;a href=&quot;https://realpython.com/coding-font/&quot;&gt;typeface&lt;/a&gt; a programmer uses.&lt;/p&gt;
&lt;p&gt;For example, consider the code below, where you assign the value &lt;code&gt;2&lt;/code&gt; to the single letter &lt;code&gt;O&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;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;n&quot;&gt;O&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;  &lt;span class=&quot;c1&quot;&gt;# ❌ Not recommended&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;Doing this may look like you’re trying to reassign &lt;code&gt;2&lt;/code&gt; to zero. While making such a reassignment isn’t possible in Python and will cause a &lt;a href=&quot;https://realpython.com/python-exceptions/&quot;&gt;syntax error&lt;/a&gt;, using an ambigious variable name such as &lt;code&gt;O&lt;/code&gt; can make your code more confusing and harder to read and reason about.&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python-pep8/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-pep8/ »&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>Getters and Setters: Manage Attributes in Python</title>
      <id>https://realpython.com/python-getter-setter/</id>
      <link href="https://realpython.com/python-getter-setter/"/>
      <updated>2026-10-30T14:00:00+00:00</updated>
      <summary>Learn what Python getter and setter methods are, why properties are usually the better choice, and when getters and setters still make sense.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Getter and setter methods allow you to access and mutate non-public attributes while maintaining &lt;a href=&quot;/ref/glossary/encapsulation/&quot; class=&quot;ref-link&quot;&gt;encapsulation&lt;/a&gt;. In Python, you’ll typically expose attributes as part of your public API and use properties when you need attributes with functional behavior. This tutorial guides you through writing getter and setter methods, replacing them with properties, and exploring alternatives like &lt;a href=&quot;/ref/glossary/descriptor/&quot; class=&quot;ref-link&quot;&gt;descriptors&lt;/a&gt; for optimized attribute management.&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;Getter&lt;/strong&gt; and &lt;strong&gt;setter&lt;/strong&gt; methods allow you to access and modify data attributes while maintaining &lt;strong&gt;encapsulation&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Python properties&lt;/strong&gt; can replace getters and setters, providing a more &lt;a href=&quot;/ref/glossary/pythonic/&quot; class=&quot;ref-link&quot;&gt;Pythonic&lt;/a&gt; way to manage attributes with &lt;strong&gt;functional behavior&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;You typically &lt;strong&gt;avoid&lt;/strong&gt; using getters and setters in Python unless necessary, as properties and &lt;strong&gt;descriptors&lt;/strong&gt; offer more flexible solutions.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Descriptors&lt;/strong&gt; are an advanced Python feature that enable reusable attributes with &lt;strong&gt;attached behaviors&lt;/strong&gt; across different classes.&lt;/li&gt;
&lt;li&gt;In some scenarios, &lt;strong&gt;&lt;a href=&quot;/ref/glossary/inheritance/&quot; class=&quot;ref-link&quot;&gt;inheritance&lt;/a&gt; limitations&lt;/strong&gt; may make traditional getters and setters preferable over properties.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Even though properties are the Pythonic way to go, they can have some practical drawbacks. Because of this, you’ll find some situations where getters and setters are preferable over properties. This tutorial will delve into the nuances of using different approaches, equipping you with the knowledge to make informed decisions about attribute management in your classes.&lt;/p&gt;
&lt;p&gt;To get the most out of this tutorial, you should be familiar with Python &lt;a href=&quot;https://realpython.com/python3-object-oriented-programming/&quot;&gt;object-oriented&lt;/a&gt; programming. It’ll also be a plus if you have basic knowledge of Python &lt;a href=&quot;https://realpython.com/python-property/&quot;&gt;properties&lt;/a&gt; and &lt;a href=&quot;https://realpython.com/python-descriptors/&quot;&gt;descriptors&lt;/a&gt;.&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown&gt;Source Code:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/python-getter-setter-code/&quot; class=&quot;alert-link&quot; data-bs-toggle=&quot;modal&quot; data-bs-target=&quot;#modal-python-getter-setter-code&quot; markdown&gt;Click here to get the free code for every example in this tutorial&lt;/a&gt; that shows you how and when to use getters, setters, and properties in Python.&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 “Getters and Setters: Manage Attributes in 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-getter-setter/&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: #ff7e74;&quot; alt=&quot;Getters and Setters: Manage Attributes in Python&quot; src=&quot;https://files.realpython.com/media/Avoiding-Setters-and-Getters-with-Properties-in-Python_Watermarked.f5bf5608059a.jpg&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/Avoiding-Setters-and-Getters-with-Properties-in-Python_Watermarked.f5bf5608059a.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/Avoiding-Setters-and-Getters-with-Properties-in-Python_Watermarked.f5bf5608059a.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/Avoiding-Setters-and-Getters-with-Properties-in-Python_Watermarked.f5bf5608059a.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/Avoiding-Setters-and-Getters-with-Properties-in-Python_Watermarked.f5bf5608059a.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-getter-setter/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;Getters and Setters: Manage Attributes in Python&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;In this quiz, you&#x27;ll test your understanding of Python&#x27;s getter and setter methods, as well as properties. You&#x27;ll learn when to use these tools and how they can help maintain encapsulation in your classes.&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;Object-Oriented Python Live Course:&lt;/strong&gt; Want to practice properties and class design in a real project? In Real Python’s &lt;a href=&quot;https://realpython.com/workshops/python-oop/&quot;&gt;Object-Oriented Python&lt;/a&gt; live course, you build a complete simulator with an instructor, adding properties, data classes, and other OOP tools only when the design needs them. Join the waitlist to hear about the next dates.&lt;/p&gt;
&lt;/div&gt;
&lt;h2 id=&quot;getting-to-know-getter-and-setter-methods&quot;&gt;Getting to Know Getter and Setter Methods&lt;a class=&quot;headerlink&quot; href=&quot;#getting-to-know-getter-and-setter-methods&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;When you define a &lt;a href=&quot;https://realpython.com/python-classes/&quot;&gt;class&lt;/a&gt; in &lt;a href=&quot;/ref/glossary/oop/&quot; class=&quot;ref-link&quot;&gt;object-oriented programming (OOP)&lt;/a&gt;, you’ll likely end up with some instance and class &lt;a href=&quot;https://realpython.com/python3-object-oriented-programming/#class-and-instance-attributes&quot;&gt;attributes&lt;/a&gt;. These attributes are just &lt;a href=&quot;https://realpython.com/python-variables/&quot;&gt;variables&lt;/a&gt; that you can access through the instance, the class, or both.&lt;/p&gt;
&lt;p&gt;Attributes hold the internal &lt;a href=&quot;https://en.wikipedia.org/wiki/State_(computer_science)&quot;&gt;state&lt;/a&gt; of objects. In many cases, you’ll need to access and mutate this state, which involves accessing and mutating the attributes. Typically, you’ll have at least two ways to access and mutate attributes. You can either:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Access and mutate the attribute &lt;strong&gt;directly&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Use &lt;strong&gt;methods&lt;/strong&gt; to access and mutate the attribute&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If you expose the attributes of a class to your users, then those attributes automatically become part of the class’s public &lt;a href=&quot;https://en.wikipedia.org/wiki/API&quot;&gt;API&lt;/a&gt;. They’ll be &lt;strong&gt;public attributes&lt;/strong&gt;, which means that your users will directly access and mutate the attributes in their code.&lt;/p&gt;
&lt;p&gt;Having an attribute that’s part of a class’s API will become a problem if you need to change the internal implementation of the attribute itself. A clear example of this issue is when you want to turn a &lt;strong&gt;stored&lt;/strong&gt; attribute into a &lt;strong&gt;computed&lt;/strong&gt; one. A stored attribute will immediately respond to access and mutation operations by just retrieving and storing data, while a computed attribute will run computations before such operations.&lt;/p&gt;
&lt;p&gt;The problem with regular attributes is that they can’t have an &lt;em&gt;internal implementation&lt;/em&gt; because they’re just variables. So, changing an attribute’s internal implementation will require converting the attribute into a method, which will probably break your users’ code. Why? Because they’ll have to change attribute access and mutation operations into method calls throughout their codebase if they want the code to continue working.&lt;/p&gt;
&lt;p&gt;To deal with this kind of issue, some programming languages, like Java and C++, require you to provide methods for manipulating the attributes of your classes. These methods are commonly known as &lt;strong&gt;getter&lt;/strong&gt; and &lt;strong&gt;setter&lt;/strong&gt; methods. You can also find them referred to as &lt;a href=&quot;https://en.wikipedia.org/wiki/Accessor_method&quot;&gt;accessor&lt;/a&gt; and &lt;a href=&quot;https://en.wikipedia.org/wiki/Mutator_method&quot;&gt;mutator&lt;/a&gt; methods.&lt;/p&gt;
&lt;h3 id=&quot;what-are-getter-and-setter-methods&quot;&gt;What Are Getter and Setter Methods?&lt;a class=&quot;headerlink&quot; href=&quot;#what-are-getter-and-setter-methods&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Getter and setter methods are quite popular in many object-oriented programming languages. So, it’s pretty likely that you’ve heard about them already. As a rough definition, you can say that getters and setters are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Getter:&lt;/strong&gt; A method that allows you to &lt;em&gt;access&lt;/em&gt; an attribute in a given class&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Setter:&lt;/strong&gt; A method that allows you to &lt;em&gt;set&lt;/em&gt; or &lt;em&gt;mutate&lt;/em&gt; the value of an attribute in a class&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In OOP, the getter and setter pattern suggests that public attributes should be used only when you’re sure that no one will ever need to attach behavior to them. If an attribute is likely to change its internal implementation, then you should use getter and setter methods.&lt;/p&gt;
&lt;p&gt;Implementing the getter and setter pattern requires:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Making your attributes non-public&lt;/li&gt;
&lt;li&gt;Writing getter and setter methods for each attribute&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;For example, say that you need to write a &lt;code&gt;Label&lt;/code&gt; class with text and font attributes. If you were to use getter and setter methods to manage these attributes, then you’d write the class like in the following code:&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;label.py&lt;/code&gt;&lt;/span&gt;
    &lt;div class=&quot;noselect&quot;&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Label&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;fm&quot;&gt;__init__&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;font&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
        &lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;_text&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;text&lt;/span&gt;
        &lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;_font&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;font&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;get_text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;self&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;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;_text&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;set_text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
        &lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;_text&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;value&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;get_font&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;self&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;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;_font&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;set_font&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
        &lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;_font&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;value&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 this example, the constructor of &lt;code&gt;Label&lt;/code&gt; takes two arguments, &lt;code&gt;text&lt;/code&gt; and &lt;code&gt;font&lt;/code&gt;. These arguments are stored in the &lt;code&gt;._text&lt;/code&gt; and &lt;code&gt;._font&lt;/code&gt; non-public instance attributes, respectively.&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python-getter-setter/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-getter-setter/ »&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 #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>Quiz: Inheritance and Composition: A Python OOP Guide</title>
      <id>https://realpython.com/quizzes/inheritance-composition-python/</id>
      <link href="https://realpython.com/quizzes/inheritance-composition-python/"/>
      <updated>2026-10-30T12:00:00+00:00</updated>
      <summary>In this quiz, you&#x27;ll test your understanding of inheritance and composition in Python. These are two major concepts in object-oriented programming that help model the relationship between two classes. By working through this quiz, you&#x27;ll revisit how to use inheritance and composition in Python, model class hierarchies, and use multiple inheritance.</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/inheritance-composition-python/&quot;&gt;Inheritance and Composition in Python&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit how to use inheritance and composition in Python, model class hierarchies, and use multiple inheritance.&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&#x27;s Mutable vs Immutable Types: What&#x27;s the Difference?</title>
      <id>https://realpython.com/quizzes/python-mutable-vs-immutable-types/</id>
      <link href="https://realpython.com/quizzes/python-mutable-vs-immutable-types/"/>
      <updated>2026-10-30T12:00:00+00:00</updated>
      <summary>Find out how Python&#x27;s mutable and immutable types behave, and see how mutability shapes lists, tuples, dictionaries, and your own classes.</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-mutable-vs-immutable-types/&quot;&gt;Python&amp;rsquo;s Mutable vs Immutable Types: What&amp;rsquo;s the Difference?&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit how mutable and immutable objects differ, which built-in types fall into each group, and how mutability shows up in everyday gotchas like variable aliasing, mutable default arguments, and shallow copies.&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: A Guided Journey Through Async Python</title>
      <id>https://realpython.com/learn-with-mentor-ai-async-python/</id>
      <link href="https://realpython.com/learn-with-mentor-ai-async-python/"/>
      <updated>2026-10-29T14:00:00+00:00</updated>
      <summary>Experience a new way of learning on Real Python by working through async Python in conversation with Mentor AI, one well-placed question at a time.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;I’d been writing Python for a couple of years before async programming made sense to me. I understood the general idea, but the syntax just never &lt;em&gt;felt&lt;/em&gt; like Python. Why would calling a function with &lt;code&gt;()&lt;/code&gt; not run it, and what exactly was I supposed to &lt;code&gt;await&lt;/code&gt;?&lt;/p&gt;
&lt;p&gt;Eventually I made progress through a long &lt;a href=&quot;https://realpython.com/mentor/&quot;&gt;Mentor AI&lt;/a&gt; conversation, so that’s how this tutorial works, too. Instead of reading about async Python, you’ll learn it in conversation with your mentor. The interactions show you different ways to use the mentor, and I hope you’ll add &lt;strong&gt;learning through conversation&lt;/strong&gt; to your toolkit.&lt;/p&gt;
&lt;p&gt;Mentor AI is Real Python’s AI learning assistant, and it’s part of a Real Python membership. It knows Real Python’s content and what you’ve been learning on the site. You’ll find the Mentor AI orb in the corner of every page, and clicking it starts a conversation. You need to be signed in to use it. 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;/p&gt;
&lt;p&gt;You can do everything in this tutorial right in the chat, because the mentor can run Python code for you. If you have &lt;a href=&quot;https://realpython.com/installing-python/&quot;&gt;Python installed&lt;/a&gt;, running the examples yourself is a nice bonus, but it’s optional.&lt;/p&gt;
&lt;p&gt;Usually, this is where I’d list what you’ll learn. This time, you can ask your mentor instead:&lt;/p&gt;
&lt;div class=&quot;mentor-ask-callout&quot; data-mentor-scope&gt;&lt;p class=&quot;mentor-ask-callout__lead&quot;&gt;Want to know what’s ahead?&lt;/p&gt;&lt;button type=&quot;button&quot; class=&quot;btn btn-sm btn-dark bg-gradient mentor-ask-btn&quot; data-mentor-ask=&quot;I&#x27;m about to work through this tutorial. Skim it and give me a short list of what I&#x27;ll be able to do by the end, and what I should already know before I start. Then, based on what you know about me, tell me whether I&#x27;m ready to begin.&quot; data-mentor-intent=&quot;content-ask&quot; data-mentor-source=&quot;tag&quot; data-mentor-style=&quot;callout&quot; data-mentor-submit=&quot;1&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;Tell me what I’ll learn here&lt;/span&gt;&lt;/button&gt;&lt;/div&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: A Guided Journey Through Async 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/learn-with-mentor-ai-async-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: #abe0e6;&quot; alt=&quot;A smiling person studies a machine labeled ASYNC with three hourglass lanes, an AWAIT gate, an ASK button, a friendly robot screen, and RUN, AWAIT, and DONE lights.&quot; src=&quot;https://files.realpython.com/media/Learn-With-Mentor-AI-A-Guided-Journey-Through-Async-Python_Watermarked.652a37f32fa1.jpg&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/Learn-With-Mentor-AI-A-Guided-Journey-Through-Async-Python_Watermarked.652a37f32fa1.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/Learn-With-Mentor-AI-A-Guided-Journey-Through-Async-Python_Watermarked.652a37f32fa1.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/Learn-With-Mentor-AI-A-Guided-Journey-Through-Async-Python_Watermarked.652a37f32fa1.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/Learn-With-Mentor-AI-A-Guided-Journey-Through-Async-Python_Watermarked.652a37f32fa1.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/learn-with-mentor-ai-async-python/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;Learn With Mentor AI: A Guided Journey Through Async Python&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;Practice learning async Python with Mentor AI. Check how coroutines, await, and the event loop work, and how to steer your mentor.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;

&lt;h2 id=&quot;tell-your-mentor-where-youre-starting-from&quot;&gt;Tell Your Mentor Where You’re Starting From&lt;a class=&quot;headerlink&quot; href=&quot;#tell-your-mentor-where-youre-starting-from&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The mentor already knows which tutorials, courses, exercises, and quizzes you’ve worked through on Real Python, but it can’t know how you &lt;em&gt;feel&lt;/em&gt; about a topic. Sharing that can help your mentor shape a good explanation. I started by explaining my struggles with &lt;a href=&quot;/ref/glossary/asynchronous-programming/&quot; class=&quot;ref-link&quot;&gt;async programming&lt;/a&gt;.&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; You can click the &lt;strong&gt;microphone&lt;/strong&gt; (dictate) button in any mentor conversation and speak your thoughts directly into the chat:&lt;/p&gt;
&lt;figure class=&quot;js-lightbox&quot;&gt;&lt;a href=&quot;https://files.realpython.com/media/Screenshot_2026-09-15_at_11.40.56.b504f01af311.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/Screenshot_2026-09-15_at_11.40.56.b504f01af311.png&quot; width=&quot;1292&quot; height=&quot;132&quot; srcset=&quot;/cdn-cgi/image/width=323,format=auto/https://files.realpython.com/media/Screenshot_2026-09-15_at_11.40.56.b504f01af311.png 323w, /cdn-cgi/image/width=430,format=auto/https://files.realpython.com/media/Screenshot_2026-09-15_at_11.40.56.b504f01af311.png 430w, /cdn-cgi/image/width=646,format=auto/https://files.realpython.com/media/Screenshot_2026-09-15_at_11.40.56.b504f01af311.png 646w, /cdn-cgi/image/width=1292,format=auto/https://files.realpython.com/media/Screenshot_2026-09-15_at_11.40.56.b504f01af311.png 1292w&quot; sizes=&quot;(min-width: 1200px) 690px, (min-width: 780px) calc(-5vw + 669px), (min-width: 580px) 510px, calc(100vw - 30px)&quot; alt=&quot;The Mentor input box with the microphone symbol for dictation highlighted with a red circle&quot; data-asset=&quot;7507&quot;&gt;&lt;/a&gt;&lt;/figure&gt;
&lt;p&gt;This is often the quickest way to explain what you’d like to convey.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Press the button below, then edit the message until it’s true for you. Or clear the prefilled text and simply speak your mind:&lt;/p&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;I&#x27;ve been writing Python for a couple of years, but async programming never clicked for me. I get the general idea that things can run in parallel if they don&#x27;t depend on each other. But the syntax confuses me. async def? And then I need to await... what exactly? I&#x27;d love to build a solid understanding and get practical experience writing async code. Before you explain, ask me two or three questions about what I already know, and then suggest how we should go about this.&quot; data-mentor-intent=&quot;content-ask&quot; data-mentor-source=&quot;tag&quot; data-mentor-style=&quot;button&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;Help me get started with async&lt;/span&gt;&lt;/button&gt;&lt;/p&gt;

&lt;p&gt;Keep the bit at the end, where you ask the mentor to ask &lt;em&gt;you&lt;/em&gt; questions first. You decide how every mentor conversation goes, so steer it in whatever direction helps you most.&lt;/p&gt;
&lt;p&gt;Most of the mentor buttons in this tutorial add to the conversation you already have open, so you can work through the tutorial in one chat. The &lt;strong&gt;Give a short answer&lt;/strong&gt; button in the next section is the exception: it starts a fresh conversation. If you close a conversation, you can pick it up again from your conversation history.&lt;/p&gt;
&lt;h2 id=&quot;ask-for-shorter-simpler-or-different-answers&quot;&gt;Ask for Shorter, Simpler, or Different Answers&lt;a class=&quot;headerlink&quot; href=&quot;#ask-for-shorter-simpler-or-different-answers&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;In my conversation, the mentor caught a mistake in my very first message! I’d written that I wanted things to run &lt;em&gt;in parallel&lt;/em&gt;, and it pointed out that this isn’t what &lt;a href=&quot;/ref/stdlib/asyncio/&quot; class=&quot;ref-link&quot;&gt;&lt;code&gt;asyncio&lt;/code&gt;&lt;/a&gt; does. Depending on how you edited your message, your mentor may or may not have flagged the same thing. Either way, you’ll want to get these two terms straight before anything else. So go ahead and &lt;span class=&quot;mentor-ask-inline&quot; data-mentor-scope&gt;&lt;button type=&quot;button&quot; class=&quot;btn btn-link p-0 align-baseline&quot; data-mentor-ask=&quot;What&#x27;s the difference between concurrency and parallelism, and which one does asyncio give me?&quot; data-mentor-intent=&quot;content-ask&quot; data-mentor-source=&quot;tag&quot; data-mentor-style=&quot;link&quot; data-mentor-quote-mode=&quot;paragraph&quot;&gt;&lt;span class=&quot;icon baseline 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;Ask Mentor AI&lt;/span&gt;&lt;/button&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;If the answer you get is longer than you’d like, then say so. The mentor adjusts the length, depth, and format of its answers when you ask, and asking early saves you a lot of scrolling later on:&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/learn-with-mentor-ai-async-python/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/learn-with-mentor-ai-async-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>Quiz: Learn With Mentor AI: A Guided Journey Through Async Python</title>
      <id>https://realpython.com/quizzes/learn-with-mentor-ai-async-python/</id>
      <link href="https://realpython.com/quizzes/learn-with-mentor-ai-async-python/"/>
      <updated>2026-10-29T12:00:00+00:00</updated>
      <summary>Practice learning async Python with Mentor AI. Check how coroutines, await, and the event loop work, and how to steer your mentor.</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/learn-with-mentor-ai-async-python/&quot;&gt;Learn With Mentor AI: A Guided Journey Through Async Python&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit how to steer a conversation with your mentor,
the difference between concurrency and parallelism, what calling an &lt;code&gt;async def&lt;/code&gt; function returns,
and how to avoid blocking the event loop.&lt;/p&gt;
&lt;p&gt;When you&amp;rsquo;re done, you can go further with the
&lt;a href=&quot;https://realpython.com/quizzes/python-async-features/&quot;&gt;Async Programming in Python quiz&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>Quiz: Dictionaries and Arrays: Selecting the Ideal Data Structure</title>
      <id>https://realpython.com/quizzes/dicts-arrays-ideal-data-structure/</id>
      <link href="https://realpython.com/quizzes/dicts-arrays-ideal-data-structure/"/>
      <updated>2026-10-29T12:00:00+00:00</updated>
      <summary>Test your understanding of Python dictionaries and arrays, from dict, defaultdict, and ChainMap to lists, typed arrays, and bytearray.</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/dicts-arrays-ideal-data-structure/&quot;&gt;Dictionaries and Arrays: Selecting the Ideal Data Structure&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit how Python&amp;rsquo;s built-in &lt;code&gt;dict&lt;/code&gt; works, when to
reach for specialized mappings like &lt;code&gt;defaultdict&lt;/code&gt; and &lt;code&gt;ChainMap&lt;/code&gt;, and how lists, tuples,
typed arrays, strings, and binary arrays compare when you choose an array type.&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>Build a Python MCP Client to Test Servers From Your Terminal</title>
      <id>https://realpython.com/python-mcp-client/</id>
      <link href="https://realpython.com/python-mcp-client/"/>
      <updated>2026-10-28T14:00:00+00:00</updated>
      <summary>Follow this Python project to build an MCP client that discovers MCP server capabilities and feeds an AI-powered chat with tool calls.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Building an MCP client in Python can be a good option when you’re coding MCP servers and want a quick way to test them. In this step-by-step project, you’ll build a minimal MCP client for the command line. It’ll be able to connect to an MCP server through the standard input/output (stdio) transport, list the server’s capabilities, and use the server’s tools to feed an AI-powered chat.&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;You can build an &lt;strong&gt;MCP client&lt;/strong&gt; app for the command line using the &lt;strong&gt;MCP Python SDK&lt;/strong&gt; and &lt;code&gt;argparse&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;You can list a &lt;strong&gt;server’s capabilities&lt;/strong&gt; by calling &lt;code&gt;.list_tools()&lt;/code&gt;, &lt;code&gt;.list_prompts()&lt;/code&gt;, and &lt;code&gt;.list_resources()&lt;/code&gt; on a &lt;code&gt;ClientSession&lt;/code&gt; instance.&lt;/li&gt;
&lt;li&gt;You can use the &lt;strong&gt;OpenAI Python SDK&lt;/strong&gt; to integrate MCP &lt;strong&gt;tool responses&lt;/strong&gt; into an AI-powered chat session.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Next, you’ll move through setup, client implementation, capability discovery, chat handling, and packaging to test MCP servers from your terminal.&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 get the most out of this coding project, you should have some previous knowledge of how to manage a Python project with &lt;code&gt;uv&lt;/code&gt;. You should also know the basics of working with the &lt;a href=&quot;/ref/stdlib/asyncio/&quot; class=&quot;ref-link&quot;&gt;&lt;code&gt;asyncio&lt;/code&gt;&lt;/a&gt; and &lt;a href=&quot;/ref/stdlib/argparse/&quot; class=&quot;ref-link&quot;&gt;&lt;code&gt;argparse&lt;/code&gt;&lt;/a&gt; libraries from the &lt;a href=&quot;/ref/glossary/standard-library/&quot; class=&quot;ref-link&quot;&gt;standard library&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;To satisfy these knowledge requirements, you can take a look at the following resources:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/python-uv/&quot;&gt;Managing Python Projects With &lt;code&gt;uv&lt;/code&gt;: An All-in-One Solution&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/async-io-python/&quot;&gt;Python’s &lt;code&gt;asyncio&lt;/code&gt;: A Hands-On Walkthrough&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/command-line-interfaces-python-argparse/&quot;&gt;Build Command-Line Interfaces With Python’s &lt;code&gt;argparse&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Familiarity with OpenAI’s Python API, &lt;a href=&quot;https://github.com/openai/openai-python&quot;&gt;&lt;code&gt;openai&lt;/code&gt;&lt;/a&gt;, will also be helpful because you’ll use this library to power the chat functionality of your MCP client. You’ll also use the &lt;a href=&quot;/ref/ai-coding-glossary/mcp/&quot; class=&quot;ref-link&quot;&gt;Model Context Protocol (MCP)&lt;/a&gt; Python &lt;a href=&quot;https://github.com/modelcontextprotocol/python-sdk&quot;&gt;SDK&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Don’t worry if you don’t have all of the prerequisite knowledge before starting this tutorial—that’s completely okay! You’ll learn through the process of getting your hands dirty as you build the project. If you get stuck, then take some time to review the resources linked above. Then, get back to the code.&lt;/p&gt;
&lt;p&gt;You’ll also need an MCP server to try your client as you build it. Don’t worry if you don’t have one available—you can use the server provided in &lt;a href=&quot;#step-2-write-a-minimal-mcp-client-with-the-python-sdk&quot;&gt;step 2&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In this tutorial, you won’t get into the details of creating MCP servers. To learn more about this topic, check out the &lt;a href=&quot;https://realpython.com/python-mcp/&quot;&gt;Python MCP Server: Connect LLMs to Your Data&lt;/a&gt; tutorial. Finally, you can download the project’s source code and related files by clicking the link below.&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown&gt;Get Your Code:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/python-mcp-client-code/&quot; class=&quot;alert-link&quot; data-bs-toggle=&quot;modal&quot; data-bs-target=&quot;#modal-python-mcp-client-code&quot; markdown&gt;Click here to download the free sample code&lt;/a&gt; you’ll use to build a Python MCP client to test servers from your terminal.&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 “Build a Python MCP Client to Test Servers From Your Terminal” 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-mcp-client/&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;Build a Python MCP Client to Test Servers From Your Terminal&quot; src=&quot;https://files.realpython.com/media/How-to-Build-a-Minimal-MCP-Client-in-Python-to-Test-Your-MCP-Servers_Watermarked.0507b57d9828.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-Build-a-Minimal-MCP-Client-in-Python-to-Test-Your-MCP-Servers_Watermarked.0507b57d9828.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/How-to-Build-a-Minimal-MCP-Client-in-Python-to-Test-Your-MCP-Servers_Watermarked.0507b57d9828.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/How-to-Build-a-Minimal-MCP-Client-in-Python-to-Test-Your-MCP-Servers_Watermarked.0507b57d9828.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/How-to-Build-a-Minimal-MCP-Client-in-Python-to-Test-Your-MCP-Servers_Watermarked.0507b57d9828.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-mcp-client/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;Build a Python MCP Client to Test Servers From Your Terminal&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;Learn how to create a Python MCP client, start an AI-powered chat session, and run it from the command line. Check your understanding.&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;AI Agent From Scratch Live Course:&lt;/strong&gt; Curious what happens on the agent’s side when it uses tools like these? In Real Python’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 build the agent loop by hand and learn why agents do what they do. Join the waitlist to hear about the next dates.&lt;/p&gt;
&lt;/div&gt;
&lt;h2 id=&quot;step-1-set-up-the-project-and-the-environment&quot;&gt;Step 1: Set Up the Project and the Environment&lt;a class=&quot;headerlink&quot; href=&quot;#step-1-set-up-the-project-and-the-environment&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;To manage your MCP client project, you’ll use &lt;code&gt;uv&lt;/code&gt;, a command-line tool for Python project management. If you don’t have this tool on your current system, then it’s worth checking out the &lt;a href=&quot;https://realpython.com/python-uv/&quot;&gt;Managing Python Projects With &lt;code&gt;uv&lt;/code&gt;: An All-in-One Solution&lt;/a&gt; tutorial.&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 prefer not to use &lt;code&gt;uv&lt;/code&gt;, then you can use a combination of alternative tools such as &lt;a href=&quot;https://realpython.com/intro-to-pyenv/&quot;&gt;&lt;code&gt;pyenv&lt;/code&gt;&lt;/a&gt;, &lt;a href=&quot;/ref/stdlib/venv/&quot; class=&quot;ref-link&quot;&gt;&lt;code&gt;venv&lt;/code&gt;&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/what-is-pip/&quot;&gt;&lt;code&gt;pip&lt;/code&gt;&lt;/a&gt;, or &lt;a href=&quot;https://realpython.com/dependency-management-python-poetry/&quot;&gt;&lt;code&gt;poetry&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Once you have &lt;code&gt;uv&lt;/code&gt; or another tool set up, go ahead and open a terminal window. Then, move to a directory where you typically store your projects. From there, run the following commands to scaffold and initialize a new &lt;code&gt;mcp-client/&lt;/code&gt; project:&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;mcp-client
&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;mcp-client/
&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;uv&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;s2&quot;&gt;&quot;mcp&amp;gt;=2.2.0,&amp;lt;3.0&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;openai&amp;gt;=3.16.2,&amp;lt;4.0&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;The first command creates a new Python project in an &lt;code&gt;mcp-client/&lt;/code&gt; directory. The resulting directory will have the following structure:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;mcp-client/
├── .git/
├── .gitignore
├── .python-version
├── README.md
├── main.py
└── pyproject.toml
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;First, you have the &lt;code&gt;.git/&lt;/code&gt; directory and the &lt;code&gt;.gitignore&lt;/code&gt; file, which will help you version-control the project.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;.python-version&lt;/code&gt; file contains the default Python version for the current project. This file tells &lt;code&gt;uv&lt;/code&gt; which Python version to use when creating a dedicated &lt;a href=&quot;https://realpython.com/python-virtual-environments-a-primer/&quot;&gt;virtual environment&lt;/a&gt; for the project. This file will contain the version number of the Python interpreter you’re currently using.&lt;/p&gt;
&lt;p&gt;Next, you have an empty &lt;a href=&quot;https://realpython.com/readme-python-project/&quot;&gt;&lt;code&gt;README.md&lt;/code&gt;&lt;/a&gt; file that you can use to provide basic documentation for your project. The &lt;code&gt;main.py&lt;/code&gt; file provides a Python script that you can optionally use as the project’s entry point. You won’t use this file in this tutorial, so feel free to remove it.&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python-mcp-client/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-mcp-client/ »&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: Creating a Scalable Flask Web Application From Scratch</title>
      <id>https://realpython.com/quizzes/create-scalable-flask-web-app/</id>
      <link href="https://realpython.com/quizzes/create-scalable-flask-web-app/"/>
      <updated>2026-10-28T12:00:00+00:00</updated>
      <summary>Test your understanding of Flask project structure, from the application factory and blueprints to Jinja templates and static files.</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/create-scalable-flask-web-app/&quot;&gt;Creating a Scalable Flask Web Application From Scratch&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit how to set up a Flask project in a virtual
environment, organize your code with an application factory and blueprints, build pages
with Jinja templates, and link static files.&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>Pyrefly: A Fast Static Type Checker for Python Projects</title>
      <id>https://realpython.com/pyrefly-python/</id>
      <link href="https://realpython.com/pyrefly-python/"/>
      <updated>2026-10-27T14:00:00+00:00</updated>
      <summary>Learn how to use Pyrefly, a fast static type checker for Python, to catch type errors, generate type annotations, and measure type coverage.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Pyrefly is a fast static type checker for Python that helps you catch type-related issues before running your code. It also includes features for generating type hints and measuring type coverage across a codebase.&lt;/p&gt;
&lt;p&gt;In this tutorial, you’ll use Pyrefly to catch type errors, add type hints to existing code, track your project’s type coverage, and see how its speed compares. You’ll get the most out of it if you’re comfortable writing functions and adding basic &lt;a href=&quot;https://realpython.com/python-type-checking/&quot;&gt;type hints&lt;/a&gt; in Python 3.10 or later. The table below gives you a quick comparison with two popular alternatives, &lt;a href=&quot;https://microsoft.github.io/pyright/&quot;&gt;Pyright&lt;/a&gt; and &lt;a href=&quot;/ref/tools/mypy/&quot; class=&quot;ref-link&quot;&gt;mypy&lt;/a&gt;:&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;&lt;strong&gt;Pyrefly&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;Pyright&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;mypy&lt;/strong&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Type checking&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Type-hint generation&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Type coverage&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Speed&lt;/td&gt;
&lt;td&gt;Fast&lt;/td&gt;
&lt;td&gt;Moderate&lt;/td&gt;
&lt;td&gt;Moderate&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;The table highlights where the Pyrefly CLI goes beyond other tools: it can generate type hints and measure coverage, and it’s built to be &lt;em&gt;very&lt;/em&gt; fast. The coverage comparison needs context: Pyright’s &lt;code&gt;--verifytypes&lt;/code&gt; checks a package’s public interface, while mypy’s reporting flags can summarize how much of your code has type hints.&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/pyrefly-python-code/&quot; class=&quot;alert-link&quot; data-bs-toggle=&quot;modal&quot; data-bs-target=&quot;#modal-pyrefly-python-code&quot; markdown&gt;Click here to download the free example project&lt;/a&gt; you’ll use to catch type errors, generate type hints, and measure type coverage with Pyrefly.&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 “Pyrefly: A Fast Static Type Checker for Python Projects” 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/pyrefly-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: #b9abe6;&quot; alt=&quot;A glowing bee highlights a line on a long printout from a machine with Checking, Inferring, and Coverage gauges, while a person with a clipboard points at it.&quot; src=&quot;https://files.realpython.com/media/Pyrefly_Watermarked.e01515b88827.jpg&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/Pyrefly_Watermarked.e01515b88827.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/Pyrefly_Watermarked.e01515b88827.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/Pyrefly_Watermarked.e01515b88827.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/Pyrefly_Watermarked.e01515b88827.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/pyrefly-python/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;Pyrefly: A Fast Static Type Checker for Python Projects&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;Test your understanding of Pyrefly, a fast Python type checker, from catching type errors to generating type hints and measuring type coverage.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;

&lt;h2 id=&quot;get-started-with-pyrefly&quot;&gt;Get Started With Pyrefly&lt;a class=&quot;headerlink&quot; href=&quot;#get-started-with-pyrefly&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://pyrefly.org/&quot;&gt;Pyrefly&lt;/a&gt; is available on &lt;a href=&quot;/ref/glossary/pypi/&quot; class=&quot;ref-link&quot;&gt;PyPI&lt;/a&gt;. To follow along, first create and activate a &lt;a href=&quot;https://realpython.com/python-virtual-environments-a-primer/&quot;&gt;virtual environment&lt;/a&gt;, then install Pyrefly with &lt;a href=&quot;https://realpython.com/what-is-pip/&quot;&gt;&lt;code&gt;pip&lt;/code&gt;&lt;/a&gt;:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;console&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Language: &lt;/span&gt;Shell&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; aria-label=&quot;Toggle prompts and output&quot; role=&quot;button&quot; tabindex=&quot;0&quot;&gt;&lt;span class=&quot;icon baseline js-codeblock-output-on codeblock__header--icon-lower&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.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;mkdir&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;pyrefly-demo
&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;pyrefly-demo
&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;python&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;-m&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;venv&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;.venv
&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;source&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;.venv/bin/activate
&lt;span class=&quot;gp gp-VirtualEnv&quot;&gt;(.venv)&lt;/span&gt; &lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;python&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;-m&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;pip&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;install&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;pyrefly&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;1&lt;/span&gt;.2.0
&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;Note that on Windows, you’ll need to activate the environment with &lt;code&gt;.venv\Scripts\activate&lt;/code&gt; instead.&lt;/p&gt;
&lt;p&gt;One of the quickest ways to try Pyrefly is with &lt;code&gt;pyrefly snippet&lt;/code&gt;, which type-checks a short piece of Python code without creating a file. The following snippet hints &lt;code&gt;x&lt;/code&gt; as a &lt;a href=&quot;https://realpython.com/python-strings/&quot;&gt;string&lt;/a&gt; but &lt;a href=&quot;/ref/glossary/assignment/&quot; class=&quot;ref-link&quot;&gt;assigns&lt;/a&gt; it an integer:&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;pyrefly&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;snippet&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;x: str = 1&quot;&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;ERROR `Literal[1]` is not assignable to `str` [bad-assignment]&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt; --&amp;gt; snippet:1:10&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;  |&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;1 | x: str = 1&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;  |    ---   ^&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;  |    |&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;  |    declared type&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;  |&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt; INFO 1 error&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot; aria-label=&quot;Copy to clipboard&quot;&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.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;Pyrefly reports an error because the &lt;a href=&quot;https://realpython.com/python-variables/&quot;&gt;variable&lt;/a&gt; &lt;code&gt;x&lt;/code&gt; is hinted as &lt;code&gt;str&lt;/code&gt;, but the assigned value is an &lt;a href=&quot;/ref/builtin-types/int/&quot; class=&quot;ref-link&quot;&gt;&lt;code&gt;int&lt;/code&gt;&lt;/a&gt;. The error shows it as &lt;code&gt;Literal[1]&lt;/code&gt;, the most specific type Pyrefly can infer for &lt;code&gt;1&lt;/code&gt;. Assigning a value of the correct type removes the error:&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;pyrefly&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;snippet&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&#x27;x: str = &quot;Hello, World!&quot;&#x27;&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt; INFO 0 errors&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;Like other type-checking tools, Pyrefly checks your code against its &lt;a href=&quot;/ref/glossary/type-hint/&quot; class=&quot;ref-link&quot;&gt;type hints&lt;/a&gt; without executing it. As your projects grow, this can help you catch type-related issues before they become runtime bugs.&lt;/p&gt;
&lt;p&gt;In addition to being a &lt;a href=&quot;/ref/glossary/command-line-interface/&quot; class=&quot;ref-link&quot;&gt;command-line&lt;/a&gt; tool for type-checking your code, Pyrefly includes a language server for editor integration. This tutorial focuses on the command-line workflow, but you can find setup &lt;a href=&quot;https://pyrefly.org/en/docs/IDE/&quot;&gt;instructions for popular editors&lt;/a&gt; in the official documentation.&lt;/p&gt;
&lt;h2 id=&quot;catch-type-errors-in-a-python-project-before-execution&quot;&gt;Catch Type Errors in a Python Project Before Execution&lt;a class=&quot;headerlink&quot; href=&quot;#catch-type-errors-in-a-python-project-before-execution&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;While &lt;code&gt;pyrefly snippet&lt;/code&gt; is useful for quickly checking a small piece of code, most type checking happens across modules, &lt;a href=&quot;/ref/glossary/package/&quot; class=&quot;ref-link&quot;&gt;packages&lt;/a&gt;, and even entire projects. You can use Pyrefly to analyze Python files in a codebase with &lt;code&gt;pyrefly check&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;First, initialize Pyrefly in your project folder. The &lt;code&gt;--non-interactive&lt;/code&gt; flag accepts the default settings instead of prompting you for each one:&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;pyrefly&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;init&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;--non-interactive
&lt;span class=&quot;go&quot;&gt; INFO New config written to `.../pyrefly.toml`&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt; INFO Running pyrefly check...&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt; ...&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot; aria-label=&quot;Copy to clipboard&quot;&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.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 command creates a &lt;code&gt;pyrefly.toml&lt;/code&gt; configuration file that instructs Pyrefly to check all Python files and &lt;a href=&quot;https://realpython.com/jupyter-notebook-introduction/&quot;&gt;Jupyter notebooks&lt;/a&gt; in the current project. You may also notice that &lt;code&gt;pyrefly init&lt;/code&gt; automatically runs a type check after creating the configuration file. Since the folder doesn’t contain any Python files yet, this first check has nothing to report, so instead, focus on the configuration file that &lt;code&gt;pyrefly init&lt;/code&gt; creates.&lt;/p&gt;
&lt;p&gt;Here’s what that file may look like:&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/pyrefly-python/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/pyrefly-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>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 14 and 15&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>Quiz: How to Get Out of Tutorial Hell</title>
      <id>https://realpython.com/quizzes/how-to-get-out-of-tutorial-hell/</id>
      <link href="https://realpython.com/quizzes/how-to-get-out-of-tutorial-hell/"/>
      <updated>2026-10-27T12:00:00+00:00</updated>
      <summary>Test how well you can turn Python tutorials into practical projects by specifying problems, weighing tradeoffs, and knowing when you&#x27;re done.</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/how-to-get-out-of-tutorial-hell/&quot;&gt;How to Get Out of Tutorial Hell&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit why tutorials deliberately narrow a problem,
which general skills they leave out, and how analyzing tutorials, writing your own, and
building projects help you practice specifying problems, making tradeoffs, spotting gaps
in your knowledge, and deciding when you&amp;rsquo;re done.&lt;/p&gt;
&lt;p&gt;When you&amp;rsquo;re ready to put these skills to work, pick something to build from
&lt;a href=&quot;https://realpython.com/intermediate-python-project-ideas/&quot;&gt;13 Project Ideas for Intermediate Python Developers&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>Quiz: Exploring AI Coding Agent Workflows</title>
      <id>https://realpython.com/quizzes/exploring-ai-coding-agent-workflows/</id>
      <link href="https://realpython.com/quizzes/exploring-ai-coding-agent-workflows/"/>
      <updated>2026-10-27T12:00:00+00:00</updated>
      <summary>Test your understanding of IDE, terminal, PR, and cloud AI coding agents, and learn which workflow fits each development task.</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/exploring-ai-coding-agent-workflows/&quot;&gt;Exploring AI Coding Agent Workflows&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit the four common agent workflow types,
how coding agents loop through reading, reasoning, acting, and evaluating, and what
makes IDE, terminal, pull request, and cloud agents distinct.&lt;/p&gt;
&lt;p&gt;You&amp;rsquo;ll also check how to match the right workflow to a task and which pitfalls to
avoid, so you can keep your code safe and stay in control of what gets merged.&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: MCP vs API Calls: Which Should You Use for Python LLM Apps?</title>
      <id>https://realpython.com/quizzes/mcp-vs-api/</id>
      <link href="https://realpython.com/quizzes/mcp-vs-api/"/>
      <updated>2026-10-27T12:00:00+00:00</updated>
      <summary>Test your understanding of MCP vs API calls in Python LLM apps, from tool schemas and MCP servers to when each approach pays off.</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/mcp-vs-api/&quot;&gt;MCP vs API Calls: Which Should You Use for Python LLM Apps?&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit how direct API calls and an MCP server each
connect the same Python tool to a model, where the tool schema comes from in each approach,
how an MCP client discovers and calls tools, and when the extra server pays for itself.&lt;/p&gt;
&lt;p&gt;Good luck!&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 Circular Imports: Why They Happen and How to Fix Them</title>
      <id>https://realpython.com/quizzes/python-circular-imports/</id>
      <link href="https://realpython.com/quizzes/python-circular-imports/"/>
      <updated>2026-10-27T12:00:00+00:00</updated>
      <summary>Test your understanding of Python circular imports, from how the import system loads modules to the fixes and workarounds that break a cycle.</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-circular-imports/&quot;&gt;Python Circular Imports: Why They Happen and How to Fix Them&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit how &lt;code&gt;sys.modules&lt;/code&gt; and partially initialized
modules lead to circular imports, how to remove a dependency and guard type-only imports
with &lt;code&gt;TYPE_CHECKING&lt;/code&gt;, and which workarounds hold up when you can&amp;rsquo;t restructure your code yet.&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>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 14 and 15&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>Exploring the MVC Pattern in Python</title>
      <id>https://realpython.com/courses/exploring-mvc-pattern-python/</id>
      <link href="https://realpython.com/courses/exploring-mvc-pattern-python/"/>
      <updated>2026-10-06T14:00:00+00:00</updated>
      <summary>Learn how the Model-View-Controller pattern organizes Python web apps, then build a small Flask app using models, views, and controllers.</summary>
      <content type="html">
        &lt;p&gt;If you&amp;rsquo;re curious about web development, then you&amp;rsquo;ve likely encountered the abbreviation &lt;strong&gt;MVC&lt;/strong&gt;, which stands for &lt;a href=&quot;https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller&quot;&gt;Model-View-Controller&lt;/a&gt;. You may know that it&amp;rsquo;s a common design pattern that&amp;rsquo;s fundamental to many Python web frameworks and even desktop applications.&lt;/p&gt;
&lt;p&gt;But what exactly does it mean? If you&amp;rsquo;ve had a hard time wrapping your head around the concept, then this video course is for you.&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;Learn what &lt;strong&gt;models&lt;/strong&gt;, &lt;strong&gt;views&lt;/strong&gt;, and &lt;strong&gt;controllers&lt;/strong&gt; are &lt;strong&gt;conceptually&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Follow a &lt;strong&gt;user&amp;rsquo;s request&lt;/strong&gt; through an MVC application from end to end&lt;/li&gt;
&lt;li&gt;Tie your conceptual understanding back to &lt;strong&gt;concrete web development examples&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Build a small &lt;strong&gt;Flask&lt;/strong&gt; app that puts the MVC pattern into practice&lt;/li&gt;
&lt;/ul&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>Community Videos</title>
      <id>https://realpython.com/courses/community-videos/</id>
      <link href="https://realpython.com/courses/community-videos/"/>
      <updated>2026-09-30T14:00:00+00:00</updated>
      <summary>Watch Real Python&#x27;s YouTube videos right here on the site, with the resources mentioned in each video and a full transcript.</summary>
      <content type="html">
        &lt;p&gt;This collection gathers the videos that the Real Python team published on the &lt;a href=&quot;https://www.youtube.com/@realpython&quot;&gt;Real Python YouTube channel&lt;/a&gt;, so you can watch them right here on Real Python.&lt;/p&gt;
&lt;p&gt;Each lesson contains the full video, the resources mentioned in it, and a transcript. The newest video is always at the top, and new videos are added as they&amp;rsquo;re released.&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>What&#x27;s New in Python 3.15</title>
      <id>https://realpython.com/courses/whats-new-in-python-315/</id>
      <link href="https://realpython.com/courses/whats-new-in-python-315/"/>
      <updated>2026-09-29T14:00:00+00:00</updated>
      <summary>Explore the new features in Python 3.15, including lazy imports, frozendict, sentinel values, a sampling profiler, and a faster JIT.</summary>
      <content type="html">
        &lt;p&gt;Python 3.15 is here! After a last-minute third release candidate, the &lt;a href=&quot;https://www.python.org/downloads/release/python-3150/&quot;&gt;final release&lt;/a&gt; came out on October 9, 2026, so you can install it today and start using the new features in your own code. This is a good time to see what the new version has in store for you.&lt;/p&gt;
&lt;p&gt;This release trims the time you spend waiting. Imports can wait until you need them, the JIT compiler got faster, and a new profiler shows you where the remaining slow parts hide. There&amp;rsquo;s also plenty in it for everyday code, including two new built-in types.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this video course, you&amp;rsquo;ll explore features like:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Lazy imports&lt;/strong&gt; with the new &lt;code&gt;lazy&lt;/code&gt; keyword&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;frozendict&lt;/code&gt;&lt;/strong&gt;, an immutable mapping in the built-ins&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;sentinel&lt;/code&gt;&lt;/strong&gt;, a clean way to say &amp;ldquo;no value given&amp;rdquo;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A sampling profiler&lt;/strong&gt; that you can point at a running process&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;UTF-8&lt;/strong&gt; as the default encoding everywhere&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;An upgraded JIT compiler&lt;/strong&gt; with measurable speedups&lt;/li&gt;
&lt;/ul&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>Using the Claude API in Python</title>
      <id>https://realpython.com/courses/using-claude-api-python/</id>
      <link href="https://realpython.com/courses/using-claude-api-python/"/>
      <updated>2026-09-22T14:00:00+00:00</updated>
      <summary>Learn how to use the Claude API in Python to send prompts, control responses with system instructions, and get structured output.</summary>
      <content type="html">
        &lt;p&gt;The fastest way to use the Claude API in Python is to install &lt;code&gt;anthropic&lt;/code&gt;, set your API key, and call &lt;code&gt;client.messages.create()&lt;/code&gt;. You&amp;rsquo;ll have a working response in under a minute.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;/ref/ai-coding-tools/claude/&quot; class=&quot;ref-link&quot;&gt;Claude&lt;/a&gt; is Anthropic&amp;rsquo;s &lt;a href=&quot;/ref/ai-coding-glossary/llm/&quot; class=&quot;ref-link&quot;&gt;large language model&lt;/a&gt;, accessible via a clean &lt;a href=&quot;https://realpython.com/api-integration-in-python/&quot;&gt;REST API&lt;/a&gt; with an official Python SDK. Unlike heavier AI frameworks that require you to wire up multiple components before you see any output, the &lt;code&gt;anthropic&lt;/code&gt; package gets you to a working response in a handful of lines.&lt;/p&gt;
&lt;p&gt;In this video course, you&amp;rsquo;ll install the &lt;code&gt;anthropic&lt;/code&gt; SDK, call Claude from Python, shape Claude&amp;rsquo;s behavior with a &lt;a href=&quot;/ref/ai-coding-glossary/system-prompt/&quot; class=&quot;ref-link&quot;&gt;system prompt&lt;/a&gt;, and then return structured &lt;a href=&quot;https://realpython.com/python-json/&quot;&gt;JSON&lt;/a&gt; output using &lt;a href=&quot;https://realpython.com/python-pydantic/&quot;&gt;Pydantic&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Claude&amp;rsquo;s responses are non-deterministic, so the same prompt produces different output each time, which is expected for a large language model. Also, API calls cost money based on the number of &lt;a href=&quot;/ref/ai-coding-glossary/token/&quot; class=&quot;ref-link&quot;&gt;tokens&lt;/a&gt; processed. Keep an eye on your usage in the Claude Console as you follow along.&lt;/p&gt;
&lt;p&gt;Each lesson builds on the last, and the final script is short enough to read in one sitting but complete enough to extend into a real application of your own.&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>The Real Python Podcast – Episode #309: Exploring Complex Systems &amp; Maintainable Data Science Pipelines</title>
      <id>https://realpython.com/podcasts/rpp/309/</id>
      <link href="https://realpython.com/podcasts/rpp/309/"/>
      <updated>2026-08-28T12:00:00+00:00</updated>
      <summary>What are the key characteristics of complex systems, and what are practical patterns for tackling complex coding problems? Christopher Trudeau is back on the show this week with another batch of PyCoder&#x27;s Weekly articles and projects.</summary>
      <content type="html">
        &lt;p&gt;What are the key characteristics of complex systems, and what are practical patterns for tackling complex coding problems? Christopher Trudeau is back on the show this week with another batch of PyCoder&#x27;s Weekly articles and projects.&lt;/p&gt;
        &lt;hr /&gt;
        
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
        
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast – Episode #308: Navigating Silent Failures in AI: Strategies for Effective Oversight</title>
      <id>https://realpython.com/podcasts/rpp/308/</id>
      <link href="https://realpython.com/podcasts/rpp/308/"/>
      <updated>2026-08-21T12:00:00+00:00</updated>
      <summary>Why do AI systems silently fail? How can you set up a system that produces results while also reviewing and validating the work? This week on the show, Calvin Hendryx-Parker returns to discuss his recent talk &quot;Orchestrate Agentic AI: Context, Checklists, and No-Miss Reviews.&quot;</summary>
      <content type="html">
        &lt;p&gt;Why do AI systems silently fail? How can you set up a system that produces results while also reviewing and validating the work? This week on the show, Calvin Hendryx-Parker returns to discuss his recent talk &quot;Orchestrate Agentic AI: Context, Checklists, and No-Miss Reviews.&quot;&lt;/p&gt;
        &lt;hr /&gt;
        
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
        
      </content>
    </entry>
  
    <entry>
      <title>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>
