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

  
    <entry>
      <title>Using Functional Programming in Python</title>
      <id>https://realpython.com/courses/using-functional-programming/</id>
      <link href="https://realpython.com/courses/using-functional-programming/"/>
      <updated>2025-12-09T14:00:00+00:00</updated>
      <summary>Boost your Python skills with a quick dive into functional programming: what it is, how Python supports it, and why it matters.</summary>
      <content type="html">
        &lt;p&gt;&lt;strong&gt;Functional programming&lt;/strong&gt; is a programming paradigm in which the primary method of computation is the evaluation of functions. But how does Python support functional programming?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this video course, you&amp;rsquo;ll learn:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;What the &lt;strong&gt;functional programming&lt;/strong&gt; paradigm entails&lt;/li&gt;
&lt;li&gt;What it means to say that &lt;strong&gt;functions&lt;/strong&gt; are &lt;strong&gt;first-class citizens&lt;/strong&gt; in Python&lt;/li&gt;
&lt;li&gt;How to define &lt;strong&gt;anonymous functions&lt;/strong&gt; with the &lt;strong&gt;&lt;code&gt;lambda&lt;/code&gt;&lt;/strong&gt; keyword&lt;/li&gt;
&lt;li&gt;How to implement functional code using &lt;strong&gt;&lt;code&gt;map()&lt;/code&gt;&lt;/strong&gt;, &lt;strong&gt;&lt;code&gt;filter()&lt;/code&gt;&lt;/strong&gt;, and &lt;strong&gt;&lt;code&gt;reduce()&lt;/code&gt;&lt;/strong&gt;&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>Lazy Imports Land in Python and Other Python News for December 2025</title>
      <id>https://realpython.com/python-news-december-2025/</id>
      <link href="https://realpython.com/python-news-december-2025/"/>
      <updated>2025-12-08T14:00:00+00:00</updated>
      <summary>PEP 810 brings lazy imports to Python 3.15, PyPI tightens 2FA security, and Django 6.0 reaches release candidate. Catch up on all the important Python news!</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;A lot happened last month in the world of Python! The core developers pushed ahead on &lt;strong&gt;Python 3.15&lt;/strong&gt;, accepting &lt;strong&gt;PEP 810&lt;/strong&gt; to bring explicit lazy imports to the language. PyPI tightened account security, &lt;strong&gt;Django 6.0&lt;/strong&gt; landed with a slew of new features while celebrating twenty years of releases, and the &lt;strong&gt;Python Software Foundation (PSF)&lt;/strong&gt; laid out its financial outlook and kicked off a year-end fundraiser.&lt;/p&gt;
&lt;p&gt;Let’s dive into the biggest &lt;strong&gt;Python news&lt;/strong&gt; from the past month!&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown&gt;Join Now:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/newsletter/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-newsletter&quot; markdown&gt;Click here to join the Real Python Newsletter&lt;/a&gt; and you’ll never miss another Python tutorial, course, or news update.&lt;/p&gt;
&lt;/div&gt;
&lt;h2 id=&quot;python-releases-and-pep-highlights&quot;&gt;Python Releases and PEP Highlights&lt;a class=&quot;headerlink&quot; href=&quot;#python-releases-and-pep-highlights&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Last month brought forward movement on Python 3.15, with a new alpha release and a major &lt;a href=&quot;/ref/glossary/pep/&quot; class=&quot;ref-link&quot;&gt;PEP&lt;/a&gt; acceptance. Windows users also got an update to the new Python install manager that’s set to replace the traditional installers.&lt;/p&gt;
&lt;h3 id=&quot;python-3150-alpha-2-keeps-the-train-moving&quot;&gt;Python 3.15.0 Alpha 2 Keeps the Train Moving&lt;a class=&quot;headerlink&quot; href=&quot;#python-3150-alpha-2-keeps-the-train-moving&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Python 3.15’s second alpha, &lt;a href=&quot;https://www.python.org/downloads/release/python-3150a2/&quot;&gt;3.15.0a2&lt;/a&gt;, arrived on November 19 as part of the language’s regular annual release cadence. It’s an early developer preview that isn’t intended for production, but it shows how 3.15 is shaping up and gives library authors something concrete to test against.&lt;/p&gt;
&lt;p&gt;Like &lt;a href=&quot;https://realpython.com/python-news-november-2025/#python-315-alpha-1-released&quot;&gt;alpha 1&lt;/a&gt;, this release is still relatively small in user-visible features, but it continues the work of:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Making &lt;strong&gt;UTF-8 the default text encoding&lt;/strong&gt; for files that don’t specify an encoding, via &lt;a href=&quot;https://peps.python.org/pep-0686/&quot;&gt;PEP 686&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Providing a &lt;strong&gt;dedicated profiling API&lt;/strong&gt; designed to work better with modern profilers and monitoring tools, via &lt;a href=&quot;https://peps.python.org/pep-0799/&quot;&gt;PEP 799&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Exposing lower-level C APIs for creating &lt;code&gt;bytes&lt;/code&gt; objects more efficiently, via &lt;a href=&quot;https://peps.python.org/pep-0782/&quot;&gt;PEP 782&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you maintain packages, now is a good time to &lt;a href=&quot;https://realpython.com/python-pre-release/&quot;&gt;start running tests against the alphas&lt;/a&gt; in a separate environment so you can catch regressions early.&lt;/p&gt;
&lt;p&gt;You can always confirm which Python you’re running with &lt;code&gt;python -VV&lt;/code&gt;:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; aria-label=&quot;Code block&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;mr-2 noselect&quot; aria-label=&quot;Language&quot;&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; role=&quot;button&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.5eccc70ec931.svg#regular--rectangle-terminal&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;python&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;-VV
&lt;span class=&quot;go&quot;&gt;Python 3.15.0a2 (main, Nov 19 2025, 10:42:00) [GCC ...]&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;&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.5eccc70ec931.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;Just remember to keep the alpha builds isolated from your everyday projects!&lt;/p&gt;
&lt;h3 id=&quot;pep-810-accepted-explicit-lazy-imports&quot;&gt;PEP 810 Accepted: Explicit Lazy Imports&lt;a class=&quot;headerlink&quot; href=&quot;#pep-810-accepted-explicit-lazy-imports&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;One of the month’s most consequential decisions for the language was the acceptance of &lt;a href=&quot;https://peps.python.org/pep-0810/&quot;&gt;PEP 810 – Explicit lazy imports&lt;/a&gt;, which you may have read about in &lt;a href=&quot;https://realpython.com/python-news-november-2025/#pep-810-drafted-explicit-lazy-imports&quot;&gt;last month’s news&lt;/a&gt;. The &lt;a href=&quot;/ref/glossary/python-steering-council/&quot; class=&quot;ref-link&quot;&gt;Python Steering Council&lt;/a&gt; accepted the proposal on November 3, only a month after its formal creation on October 2. With the PEP moving from &lt;em&gt;Draft&lt;/em&gt; to &lt;em&gt;Accepted&lt;/em&gt;, it’s now targeted for inclusion in Python 3.15!&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; One of the PEP’s authors, &lt;a href=&quot;https://realpython.com/search?kind=podcast&amp;amp;q=pablo+galindo+salgado&quot;&gt;Pablo Galindo Salgado&lt;/a&gt;, has been a frequent guest on the &lt;a href=&quot;https://realpython.com/podcasts/rpp/&quot;&gt;Real Python Podcast&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;PEP 810 introduces new syntax for &lt;a href=&quot;https://realpython.com/python-import/&quot;&gt;imports&lt;/a&gt; that are evaluated only when first used, rather than at module import time. At a high level, you’ll be able to write:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; aria-label=&quot;Code block&quot; data-syntax-language=&quot;python&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--blue&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot; aria-label=&quot;Language&quot;&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;lazy&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;json&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;parse&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;():&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;json&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;loads&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;payload&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;&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.5eccc70ec931.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, Python loads the &lt;code&gt;json&lt;/code&gt; module only if &lt;code&gt;parse()&lt;/code&gt; runs.&lt;/p&gt;
&lt;p&gt;The goals of explicit lazy imports are to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Improve startup time&lt;/strong&gt; for large applications with many rarely used imports&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Break tricky import cycles&lt;/strong&gt; without resorting to local imports inside functions&lt;/li&gt;
&lt;li&gt;Give frameworks and tools a &lt;strong&gt;clear, explicit way to defer expensive imports&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Lazy imports are entirely opt-in, meaning that only imports marked as &lt;code&gt;lazy&lt;/code&gt; change their behavior. The PEP is also careful to spell out how lazy modules interact with attributes like &lt;a href=&quot;https://realpython.com/python-all-attribute/&quot;&gt;&lt;code&gt;__all__&lt;/code&gt;&lt;/a&gt;, &lt;a href=&quot;/ref/glossary/exception/&quot; class=&quot;ref-link&quot;&gt;exception&lt;/a&gt; reporting, and tools such as &lt;a href=&quot;/ref/glossary/debugging/&quot; class=&quot;ref-link&quot;&gt;debuggers&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; The implementation work is still underway, so you won’t see the new syntax in 3.15.0a2 yet.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;If you maintain a framework, CLI tool, or large application, it’s worth reading through the PEP and thinking about where lazy imports could simplify your startup path or trim cold-start latency.&lt;/p&gt;
&lt;h3 id=&quot;pythons-new-install-manager-moves-forward-on-windows&quot;&gt;Python’s New Install Manager Moves Forward on Windows&lt;a class=&quot;headerlink&quot; href=&quot;#pythons-new-install-manager-moves-forward-on-windows&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python-news-december-2025/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-news-december-2025/ »&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 #276: Exploring Quantum Computing &amp; Python Frameworks</title>
      <id>https://realpython.com/podcasts/rpp/276/</id>
      <link href="https://realpython.com/podcasts/rpp/276/"/>
      <updated>2025-12-05T12:00:00+00:00</updated>
      <summary>What are the recent advances in the field of quantum computing and high-performance computing? And what Python tools can you use to develop programs that run on quantum computers? This week on the show, Real Python author Negar Vahid discusses her tutorial, &quot;Quantum Computing Basics With Qiskit.&quot;</summary>
      <content type="html">
        &lt;p&gt;What are the recent advances in the field of quantum computing and high-performance computing? And what Python tools can you use to develop programs that run on quantum computers? This week on the show, Real Python author Negar Vahid discusses her tutorial, &quot;Quantum Computing Basics With Qiskit.&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>How to Use Google&#x27;s Gemini CLI for AI Code Assistance</title>
      <id>https://realpython.com/how-to-use-gemini-cli/</id>
      <link href="https://realpython.com/how-to-use-gemini-cli/"/>
      <updated>2025-12-03T14:00:00+00:00</updated>
      <summary>Learn how to use Gemini CLI to bring Google&#x27;s AI-powered coding assistance directly into your terminal to help you analyze and fix code.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;This tutorial will teach you how to use &lt;a href=&quot;/ref/ai-coding-tools/gemini-cli/&quot; class=&quot;ref-link&quot;&gt;Gemini CLI&lt;/a&gt; to bring Google’s AI-powered coding assistance directly into your terminal. After you authenticate with your Google account, this tool will be ready to help you analyze code, identify bugs, and suggest fixes—all without leaving your familiar development environment:&lt;/p&gt;
&lt;figure&gt;
  &lt;div class=&quot;embed-responsive embed-responsive-16by9 rounded mb-3 border&quot;&gt;
    &lt;iframe loading=&quot;lazy&quot; class=&quot;embed-responsive-item&quot; src=&quot;https://player.vimeo.com/video/1133218312?background=1&quot; frameborder=&quot;0&quot; allow=&quot;fullscreen&quot; allowfullscreen&gt;&lt;/iframe&gt;
  &lt;/div&gt;
  &lt;figcaption class=&quot;figure-caption text-center&quot;&gt;Gemini CLI&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;Imagine &lt;a href=&quot;/ref/glossary/debugging/&quot; class=&quot;ref-link&quot;&gt;debugging&lt;/a&gt; code without switching between your &lt;a href=&quot;/ref/glossary/console/&quot; class=&quot;ref-link&quot;&gt;console&lt;/a&gt; and browser, or picture getting instant explanations for unfamiliar projects. Like other command-line AI assistants, Google’s Gemini CLI brings AI-powered coding assistance directly into your command line, allowing you to stay focused in your development workflow.&lt;/p&gt;
&lt;p&gt;Whether you’re troubleshooting a stubborn bug, understanding legacy code, or generating documentation, this tool acts as an intelligent pair-programming partner that understands your codebase’s context.&lt;/p&gt;
&lt;p&gt;You’re about to install Gemini CLI, authenticate with Google’s free tier, and put it to work on an actual Python project. You’ll discover how natural language queries can help you understand code faster and catch bugs that might slip past manual review.&lt;/p&gt;
&lt;h2 id=&quot;prerequisites&quot;&gt;Prerequisites&lt;a class=&quot;headerlink&quot; href=&quot;#prerequisites&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;To follow along with this tutorial, you’ll need the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Google Account:&lt;/strong&gt; A personal &lt;a href=&quot;https://www.google.com/account/about/&quot;&gt;Google account&lt;/a&gt; is required to use Gemini CLI’s free tier, which offers one thousand requests per day and sixty requests per minute at no charge.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Python 3.12 or Higher:&lt;/strong&gt; You’ll work with a Python &lt;a href=&quot;https://realpython.com/command-line-interfaces-python-argparse/&quot;&gt;command-line application&lt;/a&gt; to demonstrate Gemini CLI’s capabilities. If you haven’t already, &lt;a href=&quot;https://realpython.com/installing-python/&quot;&gt;install Python&lt;/a&gt; on your system, making sure the minimum version is &lt;a href=&quot;https://realpython.com/python312-new-features/&quot;&gt;Python 3.12&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Node.js 20 or Higher:&lt;/strong&gt; Gemini CLI is distributed through npm, Node.js’s package manager. You’ll verify your Node.js installation in the next section.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Because Gemini CLI is a command-line tool, you should feel comfortable navigating your &lt;a href=&quot;https://realpython.com/terminal-commands/&quot;&gt;terminal&lt;/a&gt; and running basic shell commands.&lt;/p&gt;
&lt;p&gt;Go ahead and download the supporting materials to get the Python project you’ll be working with throughout 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/how-to-use-gemini-cli-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-how-to-use-gemini-cli-code&quot; markdown&gt;Click here to download the free sample code&lt;/a&gt; that you’ll use to take Google’s Gemini CLI for a spin.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Once you’ve extracted the files, you’ll find a &lt;code&gt;todolist/&lt;/code&gt; directory containing a complete Python CLI application, which is similar to the &lt;a href=&quot;https://realpython.com/python-typer-cli/&quot;&gt;to-do app&lt;/a&gt; covered in another tutorial. This project will serve as your testing ground for Gemini CLI’s code analysis and debugging features.&lt;/p&gt;
&lt;div class=&quot;container border rounded text-wrap-pretty my-3&quot;&gt;

  &lt;p class=&quot;my-3&quot;&gt;&lt;mark class=&quot;marker-highlight&quot;&gt;&lt;strong&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.5eccc70ec931.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 Use Google&#x27;s Gemini CLI for AI Code Assistance” 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-xs-12 col-sm-4 col-md-3 align-self-center&quot;&gt;

      &lt;a href=&quot;/quizzes/how-to-use-gemini-cli/&quot; tabindex=&quot;-1&quot;&gt;
        &lt;div class=&quot;embed-responsive embed-responsive-16by9&quot;&gt;

            &lt;img class=&quot;card-img-top m-0 p-0 embed-responsive-item rounded&quot; style=&quot;object-fit: contain; background: #abe0e6;&quot; alt=&quot;How to Use Google&#x27;s Gemini CLI for AI Code Assistance&quot; src=&quot;https://files.realpython.com/media/How-to-Use-Gemini-CLI-to-Work-with-LLMs-in-Your-Terminal_Watermarked.bcf2fe57f200.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-Use-Gemini-CLI-to-Work-with-LLMs-in-Your-Terminal_Watermarked.bcf2fe57f200.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/How-to-Use-Gemini-CLI-to-Work-with-LLMs-in-Your-Terminal_Watermarked.bcf2fe57f200.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/How-to-Use-Gemini-CLI-to-Work-with-LLMs-in-Your-Terminal_Watermarked.bcf2fe57f200.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/How-to-Use-Gemini-CLI-to-Work-with-LLMs-in-Your-Terminal_Watermarked.bcf2fe57f200.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.5eccc70ec931.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&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/how-to-use-gemini-cli/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;How to Use Google&#x27;s Gemini CLI for AI Code Assistance&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;Learn how to install, authenticate, and safely use the Gemini CLI to interact with Google&#x27;s Gemini models.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;

&lt;h2 id=&quot;step-1-install-and-set-up-gemini-cli&quot;&gt;Step 1: Install and Set Up Gemini CLI&lt;a class=&quot;headerlink&quot; href=&quot;#step-1-install-and-set-up-gemini-cli&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Before you can start using the AI-powered features of &lt;a href=&quot;https://geminicli.com/&quot;&gt;Gemini CLI&lt;/a&gt;, you need to get it installed on your system and authenticate with Google. In this step, you’ll verify your Node.js installation, install Gemini CLI globally, and complete the authentication process to access the free tier.&lt;/p&gt;
&lt;h3 id=&quot;verify-your-nodejs-installation&quot;&gt;Verify Your Node.js Installation&lt;a class=&quot;headerlink&quot; href=&quot;#verify-your-nodejs-installation&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Gemini CLI is primarily implemented in &lt;a href=&quot;https://www.typescriptlang.org/&quot;&gt;TypeScript&lt;/a&gt;, which requires &lt;a href=&quot;https://nodejs.org/&quot;&gt;Node.js&lt;/a&gt;. You’ll need Node.js version 20 or higher to run Gemini CLI. First, check if you have Node.js installed in the required version by opening your terminal and running this command:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; aria-label=&quot;Code block&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;mr-2 noselect&quot; aria-label=&quot;Language&quot;&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; role=&quot;button&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.5eccc70ec931.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;node&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;--version
&lt;span class=&quot;go&quot;&gt;v24.11.1&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;&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.5eccc70ec931.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;If you see a version number of 20 or higher, then you’re all set. Otherwise, if you encounter a &lt;em&gt;command not found&lt;/em&gt; error or have an older version, then you’ll need to install or update Node.js before continuing.&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 on macOS or Linux, then you can leverage &lt;a href=&quot;https://brew.sh/&quot;&gt;Homebrew&lt;/a&gt; to get Gemini CLI without having to install Node.js yourself.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;The recommended approach to install Node.js is to use the &lt;a href=&quot;https://github.com/nvm-sh/nvm&quot;&gt;Node Version Manager (nvm)&lt;/a&gt;, which allows you to install and switch between multiple Node.js versions, much like &lt;a href=&quot;https://realpython.com/intro-to-pyenv/&quot;&gt;pyenv&lt;/a&gt; does for Python. You can find detailed installation instructions for your operating system on the &lt;a href=&quot;https://nodejs.org/en/download&quot;&gt;Node.js download page&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Once Node.js is installed, you’ll also have access to the &lt;a href=&quot;https://github.com/npm/cli&quot;&gt;Node Package Manager (npm)&lt;/a&gt;, which you’ll use in the next step.&lt;/p&gt;
&lt;h3 id=&quot;install-gemini-cli-globally&quot;&gt;Install Gemini CLI Globally&lt;a class=&quot;headerlink&quot; href=&quot;#install-gemini-cli-globally&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;With Node.js installed, you can now install Gemini CLI using npm. The &lt;code&gt;-g&lt;/code&gt; flag installs the package globally, making the &lt;code&gt;gemini&lt;/code&gt; command available from anywhere in your file system:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; aria-label=&quot;Code block&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;mr-2 noselect&quot; aria-label=&quot;Language&quot;&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; role=&quot;button&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.5eccc70ec931.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;npm&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;install&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;-g&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;@google/gemini-cli
&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;&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.5eccc70ec931.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/how-to-use-gemini-cli/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/how-to-use-gemini-cli/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Quiz: How to Use Google&#x27;s Gemini CLI for AI Code Assistance</title>
      <id>https://realpython.com/quizzes/how-to-use-gemini-cli/</id>
      <link href="https://realpython.com/quizzes/how-to-use-gemini-cli/"/>
      <updated>2025-12-03T12:00:00+00:00</updated>
      <summary>Learn how to install, authenticate, and safely use the Gemini CLI to interact with Google&#x27;s Gemini models.</summary>
      <content type="html">
        &lt;p&gt;In this quiz, you&amp;rsquo;ll test your understanding of the &lt;a href=&quot;https://realpython.com/how-to-use-gemini-cli/&quot;&gt;How to Use Google&amp;rsquo;s Gemini CLI for AI Code Assistance&lt;/a&gt; tutorial.&lt;/p&gt;
&lt;p&gt;By working through these questions, you&amp;rsquo;ll revisit how to install and verify prerequisites like Node.js, explore authentication options, and understand the CLI&amp;rsquo;s permission and safety model. You&amp;rsquo;ll also practice managing interactive sessions, enforcing stronger models, and approving or editing shell commands securely.&lt;/p&gt;
&lt;p&gt;To deepen your understanding, review the sections on verifying your environment, authenticating safely, and running interactive prompts in the linked tutorial.&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>Introduction to pandas</title>
      <id>https://realpython.com/courses/introduction-pandas/</id>
      <link href="https://realpython.com/courses/introduction-pandas/"/>
      <updated>2025-12-02T14:00:00+00:00</updated>
      <summary>Learn pandas DataFrames: explore, clean, and visualize data with powerful tools for analysis. Delete unneeded data, import data from a CSV file, and more.</summary>
      <content type="html">
        &lt;p&gt;The &lt;a href=&quot;https://pandas.pydata.org/pandas-docs/stable/reference/frame.html&quot;&gt;pandas DataFrame&lt;/a&gt; is a &lt;a href=&quot;https://pandas.pydata.org/pandas-docs/stable/user_guide/dsintro.html&quot;&gt;structure&lt;/a&gt; that contains &lt;strong&gt;two-dimensional data&lt;/strong&gt; and its corresponding &lt;strong&gt;labels&lt;/strong&gt;. DataFrames are widely used in &lt;a href=&quot;https://realpython.com/tutorials/data-science/&quot;&gt;data science&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/tutorials/machine-learning/&quot;&gt;machine learning&lt;/a&gt;, scientific computing, and many other data-intensive fields.&lt;/p&gt;
&lt;p&gt;DataFrames are similar to &lt;a href=&quot;https://realpython.com/python-sql-libraries/&quot;&gt;SQL tables&lt;/a&gt; or the spreadsheets that you work with in Excel or Calc. In many cases, DataFrames are faster, easier to use, and more powerful than tables or spreadsheets because they&amp;rsquo;re an integral part of the &lt;a href=&quot;https://www.python.org/about/&quot;&gt;Python&lt;/a&gt; and &lt;a href=&quot;https://numpy.org/&quot;&gt;NumPy&lt;/a&gt; ecosystems.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this video course, you&amp;rsquo;ll learn:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;What a &lt;strong&gt;pandas DataFrame&lt;/strong&gt; is and how to create one&lt;/li&gt;
&lt;li&gt;How to &lt;strong&gt;access, modify, add, sort, filter, and delete&lt;/strong&gt; data&lt;/li&gt;
&lt;li&gt;How to handle &lt;strong&gt;missing values&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;How to work with &lt;strong&gt;time-series data&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;How to quickly &lt;strong&gt;visualize&lt;/strong&gt; data&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>Quantum Computing Basics With Qiskit</title>
      <id>https://realpython.com/quantum-computing-basics/</id>
      <link href="https://realpython.com/quantum-computing-basics/"/>
      <updated>2025-12-01T14:00:00+00:00</updated>
      <summary>Understand quantum computing basics like qubits, superposition, and entanglement. Then use Python Qiskit to build your first quantum circuit.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Every classical computer reduces the world to 0s and 1s. That binary framework has carried us from calculators to supercomputers, but some problems demand checking through 2&lt;sup&gt;&lt;em&gt;n&lt;/em&gt;&lt;/sup&gt; possibilities, a task that outpaces even the best machines. Now, what if information could exist in many states at once? That &lt;em&gt;what if&lt;/em&gt; turned into a new model called &lt;strong&gt;quantum computation&lt;/strong&gt;. Keep reading to break with binaries and get an overview of quantum computing basics.&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;Qubits&lt;/strong&gt;, or quantum bits, are the basic units of quantum computing.&lt;/li&gt;
&lt;li&gt;A qubit can be in a &lt;strong&gt;superposition&lt;/strong&gt; of 0 and 1. This means its state is a precise combination of both until measurement forces it to become either 0 or 1.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;Bloch sphere&lt;/strong&gt; is a standard way to visualize what a single qubit is doing.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Entanglement&lt;/strong&gt; creates strong correlations between two or more qubits, so measuring one tells you something about the others that you can’t explain with classical reasoning alone.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Interference&lt;/strong&gt; adjusts probability amplitudes so that wrong outcomes cancel and useful outcomes reinforce.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Quantum hardware&lt;/strong&gt; comes in different architectures, each with its own strengths and limitations.&lt;/li&gt;
&lt;li&gt;With Python libraries like &lt;strong&gt;Qiskit&lt;/strong&gt;, you can build and run quantum circuits directly from Python.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Before you jump in, it’d be a good idea to go through the basics of &lt;em&gt;classical&lt;/em&gt; computing. For example, knowing &lt;a href=&quot;https://realpython.com/python-bitwise-operators/#binary-system-in-five-minutes&quot;&gt;how bits work&lt;/a&gt;, what &lt;a href=&quot;https://realpython.com/lessons/bitwise-practice-circuit-simulation/&quot;&gt;logic gates&lt;/a&gt; like &lt;code&gt;AND&lt;/code&gt; and &lt;code&gt;NOT&lt;/code&gt; do, and how you can determine the runtime complexity of an algorithm using &lt;a href=&quot;https://en.wikipedia.org/wiki/Big_O_notation&quot;&gt;Big O notation&lt;/a&gt; will help you understand the differences and advantages of quantum computing.&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/quantum-computing-basics-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-quantum-computing-basics-code&quot; markdown&gt;Click here to download the free sample code&lt;/a&gt; to build a quantum circuit with Qiskit.&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.5eccc70ec931.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 “Quantum Computing Basics With Qiskit” 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-xs-12 col-sm-4 col-md-3 align-self-center&quot;&gt;

      &lt;a href=&quot;/quizzes/quantum-computing-basics/&quot; tabindex=&quot;-1&quot;&gt;
        &lt;div class=&quot;embed-responsive embed-responsive-16by9&quot;&gt;

            &lt;img class=&quot;card-img-top m-0 p-0 embed-responsive-item rounded&quot; style=&quot;object-fit: contain; background: #abe5b2;&quot; alt=&quot;Quantum Computing Basics With Qiskit&quot; src=&quot;https://files.realpython.com/media/Quantum-Computing-Basics_Watermarked.ad6227489333.jpg&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/Quantum-Computing-Basics_Watermarked.ad6227489333.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/Quantum-Computing-Basics_Watermarked.ad6227489333.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/Quantum-Computing-Basics_Watermarked.ad6227489333.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/Quantum-Computing-Basics_Watermarked.ad6227489333.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.5eccc70ec931.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&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/quantum-computing-basics/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;Quantum Computing Basics With Qiskit&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;Test your understanding of quantum computing basics, including superposition, qubits, entanglement, and key programming concepts.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;

&lt;h2 id=&quot;introduction-to-quantum-computing&quot;&gt;Introduction to Quantum Computing&lt;a class=&quot;headerlink&quot; href=&quot;#introduction-to-quantum-computing&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Quantum computing is the use of fundamental ideas from &lt;a href=&quot;https://en.wikipedia.org/wiki/Quantum_mechanics&quot;&gt;quantum mechanics&lt;/a&gt; to perform computations on special devices called quantum computers. Quantum systems can process information in ways that classical computers can’t. For example, they can explore multiple possibilities at once. This capability is thanks to concepts like &lt;strong&gt;superposition&lt;/strong&gt;, &lt;strong&gt;entanglement&lt;/strong&gt;, and &lt;strong&gt;interference&lt;/strong&gt;, which you’ll explore soon.&lt;/p&gt;
&lt;p&gt;To see how quantum computing works, it helps to look at the main quantum concepts in the context of computing and consider how they differ from classical approaches. You’ll cover these essential concepts in this tutorial.&lt;/p&gt;
&lt;p&gt;Before moving on, keep in mind that quantum mechanics and quantum computing are often counterintuitive because they occur only at very small scales and not in everyday life. Even &lt;a href=&quot;https://en.wikipedia.org/wiki/Niels_Bohr&quot;&gt;Niels Bohr&lt;/a&gt;, one of the founders of quantum theory, once said:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;If quantum mechanics hasn’t profoundly shocked you, you haven’t understood it yet. (&lt;a href=&quot;https://www.nielsbohr.net/p/quotes.html&quot;&gt;Source&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;— Niels Bohr&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Until recently, quantum computing was seen almost entirely as a physics domain, which kept people in other fields from applying it to their own work. The good news is that you don’t need to fully grasp the physics to understand how quantum computers can solve some problems more efficiently than classical ones. You can focus on the concepts and their implementation, and only later dive into the math if you want a deeper understanding.&lt;/p&gt;
&lt;p&gt;To start, you’ll look at the basic unit of quantum information—&lt;strong&gt;quantum bits&lt;/strong&gt;, or &lt;strong&gt;qubits&lt;/strong&gt;—and learn how they differ from classical bits.&lt;/p&gt;
&lt;h2 id=&quot;qubits-superposition-and-measurement&quot;&gt;Qubits, Superposition, and Measurement&lt;a class=&quot;headerlink&quot; href=&quot;#qubits-superposition-and-measurement&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/Qubit&quot;&gt;Qubits&lt;/a&gt;, or quantum bits, are the fundamental units of quantum information. A classical bit can only be 0 or 1, but a qubit can exist in a linear combination of both states at once, a property called superposition. Physically, this usually means that the qubit is a two-level system, such as two energy levels of an atom, that can exist in a superposition of those levels.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Quantum_superposition&quot;&gt;Superposition&lt;/a&gt; allows qubits to represent multiple possibilities at the same time, allowing quantum computing programs to explore many solutions in parallel.&lt;/p&gt;
&lt;p&gt;To understand superposition, think of flipping a coin. A classical coin lands as either heads or tails. A quantum coin, however, can exist in a state that’s a blend of both heads and tails simultaneously. This is what physicists mean when they say a qubit exists in a linear combination of 0 and 1.&lt;/p&gt;
&lt;p&gt;The key difference is that while the coin is spinning in the air, you know it’ll eventually be one or zero, whereas a qubit in superposition has no definite value until it is measured. &lt;/p&gt;
&lt;p&gt;A qubit remains in superposition until you look at it, or more formally, &lt;em&gt;measure&lt;/em&gt; it. &lt;a href=&quot;https://en.wikipedia.org/wiki/Measurement_in_quantum_mechanics&quot;&gt;Measurement&lt;/a&gt; forces the qubit to collapse into one of its basis states, 0 or 1, just like your usual classical bits. The outcome is probabilistic: You can’t know in advance which result you’ll get, but you can calculate the chances based on the qubit’s state beforehand. &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; Looking at a superposition state actually destroys the superposition and collapses the qubit into a 0 or 1, or in other words, destroys the “quantumness” of the state. This means you can’t visualize qubits like bits. Instead, you view qubits as a mathematical object. However, they can be built from various physical systems: the spin of an electron, the polarization of a photon, or the energy levels of an atom.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Visualizing qubits and superposition is tricky and needs some extra mathematical tools. Turns out, a coin that’s free to rotate in three dimensions is a good analogy for one way of visualizing the quantum state of a qubit, called the &lt;strong&gt;Bloch Sphere&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&quot;https://en.wikipedia.org/wiki/Bloch_sphere&quot;&gt;&lt;strong&gt;Bloch sphere&lt;/strong&gt;&lt;/a&gt; is a geometrical, 3D sphere that’s often used to visualize qubits and their superpositions. The states of the qubits, including superpositions, are represented as points on the surface of a sphere. The closer the point is to the north pole, the higher the chance of measuring 0, and vice versa for 1:&lt;/p&gt;
&lt;figure class=&quot;js-lightbox&quot;&gt;&lt;a href=&quot;https://files.realpython.com/media/bloch-sphere-unit-vectors.3f946dd8f01f.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/bloch-sphere-unit-vectors.3f946dd8f01f.png&quot; width=&quot;813&quot; height=&quot;422&quot; srcset=&quot;/cdn-cgi/image/width=203,format=auto/https://files.realpython.com/media/bloch-sphere-unit-vectors.3f946dd8f01f.png 203w, /cdn-cgi/image/width=271,format=auto/https://files.realpython.com/media/bloch-sphere-unit-vectors.3f946dd8f01f.png 271w, /cdn-cgi/image/width=406,format=auto/https://files.realpython.com/media/bloch-sphere-unit-vectors.3f946dd8f01f.png 406w, /cdn-cgi/image/width=813,format=auto/https://files.realpython.com/media/bloch-sphere-unit-vectors.3f946dd8f01f.png 813w&quot; sizes=&quot;(min-width: 1200px) 690px, (min-width: 780px) calc(-5vw + 669px), (min-width: 580px) 510px, calc(100vw - 30px)&quot; alt=&quot;A Bloch sphere showing a qubit in the states 0 and 1.&quot; data-asset=&quot;6590&quot;&gt;&lt;/a&gt;&lt;figcaption class=&quot;figure-caption text-center&quot;&gt;Two Bloch spheres showing a qubit in the 0 (left) state and a qubit in the 1 state (right)&lt;/figcaption&gt;&lt;/figure&gt;

&lt;p&gt;For example, the north pole represents the state 0, and the south pole represents 1. What’s interesting about this sphere is that you can visualize superposition states as well:&lt;/p&gt;
&lt;figure class=&quot;js-lightbox&quot;&gt;&lt;a href=&quot;https://files.realpython.com/media/bloch-sphere-superposition.238b06594dd2.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/bloch-sphere-superposition.238b06594dd2.png&quot; width=&quot;436&quot; height=&quot;453&quot; srcset=&quot;/cdn-cgi/image/width=109,format=auto/https://files.realpython.com/media/bloch-sphere-superposition.238b06594dd2.png 109w, /cdn-cgi/image/width=145,format=auto/https://files.realpython.com/media/bloch-sphere-superposition.238b06594dd2.png 145w, /cdn-cgi/image/width=218,format=auto/https://files.realpython.com/media/bloch-sphere-superposition.238b06594dd2.png 218w, /cdn-cgi/image/width=436,format=auto/https://files.realpython.com/media/bloch-sphere-superposition.238b06594dd2.png 436w&quot; sizes=&quot;(min-width: 1200px) 690px, (min-width: 780px) calc(-5vw + 669px), (min-width: 580px) 510px, calc(100vw - 30px)&quot; alt=&quot;A Bloch sphere showing a qubit in a superposition state.&quot; data-asset=&quot;6591&quot;&gt;&lt;/a&gt;&lt;figcaption class=&quot;figure-caption text-center&quot;&gt;A Bloch sphere showing a qubit in a superposition state.&lt;/figcaption&gt;&lt;/figure&gt;

&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/quantum-computing-basics/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/quantum-computing-basics/ »&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: Quantum Computing Basics With Qiskit</title>
      <id>https://realpython.com/quizzes/quantum-computing-basics/</id>
      <link href="https://realpython.com/quizzes/quantum-computing-basics/"/>
      <updated>2025-12-01T12:00:00+00:00</updated>
      <summary>Test your understanding of quantum computing basics, including superposition, qubits, entanglement, and key programming concepts.</summary>
      <content type="html">
        &lt;p&gt;Dive into quantum computing fundamentals with this quiz. You&amp;rsquo;ll practice key ideas like superposition, measurement, entanglement, and how quantum and classical systems work together. You&amp;rsquo;ll also revisit essential Qiskit commands and understand what limits today&amp;rsquo;s quantum computers.&lt;/p&gt;
&lt;p&gt;Need a refresher? Check out &lt;a href=&quot;https://realpython.com/quantum-computing-basics/&quot;&gt;Quantum Computing Basics With Qiskit&lt;/a&gt; for clear explanations and hands-on examples.&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 Convert Bytes to Strings in Python</title>
      <id>https://realpython.com/convert-python-bytes-to-strings/</id>
      <link href="https://realpython.com/convert-python-bytes-to-strings/"/>
      <updated>2025-11-26T14:00:00+00:00</updated>
      <summary>Turn Python bytes to strings, pick the right encoding, and validate results with clear error handling strategies.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Converting bytes into readable strings in Python is an effective way to work with raw bytes fetched from files, databases, or APIs. You can do this in just three steps using the &lt;code&gt;bytes.decode()&lt;/code&gt; method. This guide lets you convert byte data into clean text, giving you a result similar to what’s shown in the following example:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; aria-label=&quot;Code block&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;mr-2 noselect&quot; aria-label=&quot;Language&quot;&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; role=&quot;button&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.5eccc70ec931.svg#regular--rectangle-terminal&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;binary_data&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;bytes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;([&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;100&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;195&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;169&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;106&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;195&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;160&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;32&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;118&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;117&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;binary_data&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;decode&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;encoding&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;utf-8&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#x27;déjà vu&#x27;&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;&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.5eccc70ec931.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;By interpreting the bytes according to a specific &lt;a href=&quot;https://realpython.com/python-encodings-guide/&quot;&gt;character encoding&lt;/a&gt;, Python transforms numeric byte values into their corresponding characters. This allows you to seamlessly handle data loaded from files, network responses, or other binary sources and work with it as normal text.&lt;/p&gt;
&lt;p&gt;A &lt;a href=&quot;https://en.wikipedia.org/wiki/Byte&quot;&gt;byte&lt;/a&gt; is a fundamental unit of digital storage and processing. Composed of eight bits (binary digits), it’s a basic building block of data in computing. Bytes represent a vast range of data types and are used extensively in data storage and in networking. It’s important to be able to manage and handle bytes where they come up. Sometimes they need to be converted into strings for further use or comprehensibility.&lt;/p&gt;
&lt;p&gt;By the end of this guide, you’ll be able to convert &lt;a href=&quot;https://realpython.com/python-bytes/&quot;&gt;Python &lt;code&gt;bytes&lt;/code&gt;&lt;/a&gt; to strings so that you can work with byte data in a human-readable format.&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/convert-python-bytes-to-strings-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-convert-python-bytes-to-strings-code&quot; markdown&gt;Click here to download the free sample code&lt;/a&gt; that you’ll use to convert bytes to strings in Python.&lt;/p&gt;
&lt;/div&gt;
&lt;h2 id=&quot;step-1-obtain-the-byte-data&quot;&gt;Step 1: Obtain the Byte Data&lt;a class=&quot;headerlink&quot; href=&quot;#step-1-obtain-the-byte-data&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Before converting &lt;code&gt;bytes&lt;/code&gt; to &lt;a href=&quot;https://realpython.com/python-strings/&quot;&gt;strings&lt;/a&gt;, you’ll need some actual bytes to work with. In everyday programming, you may not have to deal with bytes directly at all, as Python often handles their encoding and decoding behind the scenes.&lt;/p&gt;
&lt;p&gt;Binary data exchanged over the internet can be expressed in different formats, such as raw binary streams, &lt;a href=&quot;https://en.wikipedia.org/wiki/Base64&quot;&gt;Base64&lt;/a&gt;, or &lt;a href=&quot;https://en.wikipedia.org/wiki/Hexadecimal&quot;&gt;hexadecimal&lt;/a&gt; strings. When you browse a web page, download a file, or chat with a colleague, the data that emerges travels as numeric bytes before it is interpreted as text that you can read.&lt;/p&gt;
&lt;p&gt;In this step, however, you’ll obtain byte data using one of two approaches:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Using the &lt;a href=&quot;https://realpython.com/python-bytes/#the-bytes-literal-format&quot;&gt;&lt;code&gt;bytes&lt;/code&gt; literal&lt;/a&gt; (&lt;code&gt;b&quot;&quot;&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Using the &lt;a href=&quot;/ref/stdlib/urllib/&quot; class=&quot;ref-link&quot;&gt;&lt;code&gt;urllib&lt;/code&gt;&lt;/a&gt; package&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You’ll soon find that using the &lt;code&gt;urllib&lt;/code&gt; package requires that you go online. You can, however, create &lt;code&gt;bytes&lt;/code&gt; manually without reaching out to the internet at all. You do this by prefixing a string with &lt;code&gt;b&lt;/code&gt;, which creates a &lt;a href=&quot;/ref/builtin-types/bytes/&quot; class=&quot;ref-link&quot;&gt;&lt;code&gt;bytes&lt;/code&gt;&lt;/a&gt; literal containing the text inside:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; aria-label=&quot;Code block&quot; data-syntax-language=&quot;python&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--blue&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot; aria-label=&quot;Language&quot;&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;raw_bytes&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;sa&quot;&gt;b&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;These are some interesting bytes&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;&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.5eccc70ec931.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;You may be wondering why you have to create a &lt;code&gt;bytes&lt;/code&gt; object at all from strings that you can read. This isn’t just a convenience. While &lt;code&gt;bytes&lt;/code&gt; and strings share most of their methods, you can’t mix them freely. If you pass string arguments to a &lt;code&gt;bytes&lt;/code&gt; method, then you’ll get an error:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; aria-label=&quot;Code block&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;mr-2 noselect&quot; aria-label=&quot;Language&quot;&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; role=&quot;button&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.5eccc70ec931.svg#regular--rectangle-terminal&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;raw_bytes&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;sa&quot;&gt;b&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;These are some interesting bytes&quot;&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;raw_bytes&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;replace&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;y&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;o&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;gt&quot;&gt;Traceback (most recent call last):&lt;/span&gt;
&lt;span class=&quot;w&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;c&quot;&gt;...&lt;/span&gt;
&lt;span class=&quot;gr&quot;&gt;TypeError&lt;/span&gt;: &lt;span class=&quot;n&quot;&gt;a bytes-like object is required, not &#x27;str&#x27;&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;&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.5eccc70ec931.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;p&gt;A &lt;code&gt;bytes&lt;/code&gt; object only accepts other &lt;a href=&quot;/ref/glossary/bytes-like-object/&quot; class=&quot;ref-link&quot;&gt;bytes-like objects&lt;/a&gt; as arguments. If you try to use a string like &lt;code&gt;&quot;y&quot;&lt;/code&gt; with a &lt;code&gt;bytes&lt;/code&gt; method, then Python raises a &lt;a href=&quot;/ref/builtin-exceptions/typeerror/&quot; class=&quot;ref-link&quot;&gt;&lt;code&gt;TypeError&lt;/code&gt;&lt;/a&gt;. To work with raw binary data, you must explicitly use &lt;code&gt;bytes&lt;/code&gt;, not strings.&lt;/p&gt;
&lt;p&gt;Note that you can represent the same information using alternative &lt;a href=&quot;https://en.wikipedia.org/wiki/Computer_number_format&quot;&gt;numeral formats&lt;/a&gt;, including binary, decimal, or hexadecimal. For instance, in the following code snippet, you convert the same &lt;code&gt;bytes&lt;/code&gt; object from the above code example into hexadecimal and decimal formats: &lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/convert-python-bytes-to-strings/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/convert-python-bytes-to-strings/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Getting Started With Claude Code</title>
      <id>https://realpython.com/courses/getting-started-claude-code/</id>
      <link href="https://realpython.com/courses/getting-started-claude-code/"/>
      <updated>2025-11-25T14:00:00+00:00</updated>
      <summary>Learn to set up and use Claude Code for Python projects: install, run commands, and integrate with Git.</summary>
      <content type="html">
        &lt;p&gt;Learn how to set up and start using Claude Code to boost your Python workflow. Learn how it differs from Claude Chat and how to use it effectively in your development setup.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;You’ll learn how to:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Install and configure Claude Code&lt;/li&gt;
&lt;li&gt;Run it safely inside project directories&lt;/li&gt;
&lt;li&gt;Work with CLAUDE.md for task context&lt;/li&gt;
&lt;li&gt;Use Git integration for smoother coding workflows&lt;/li&gt;
&lt;li&gt;Apply Claude Code to automate real programming tasks&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>How to Properly Indent Python Code</title>
      <id>https://realpython.com/how-to-indent-in-python/</id>
      <link href="https://realpython.com/how-to-indent-in-python/"/>
      <updated>2025-11-24T14:00:00+00:00</updated>
      <summary>Learn how to properly indent Python code in IDEs, Python-aware editors, and plain text editors—plus explore PEP 8 formatters like Black and Ruff.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Knowing how to properly indent Python code is a key skill for becoming an accomplished Python developer. Beginning Python programmers know that indentation is required, but learning to indent code so it’s readable, syntactically correct, and easy to maintain is a skill that takes practice.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;By the end of this tutorial, you’ll know:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;How to &lt;strong&gt;properly indent Python code&lt;/strong&gt; in a variety of editors&lt;/li&gt;
&lt;li&gt;How &lt;strong&gt;your choice of editor&lt;/strong&gt; can impact your Python code&lt;/li&gt;
&lt;li&gt;How to &lt;strong&gt;indent code using spaces&lt;/strong&gt; in simple text editors&lt;/li&gt;
&lt;li&gt;How to use &lt;strong&gt;code formatters&lt;/strong&gt; to properly indent Python code automatically&lt;/li&gt;
&lt;li&gt;Why &lt;strong&gt;indentation is required&lt;/strong&gt; when writing Python code&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;With this knowledge, you’ll be able to write Python code confidently in any environment.&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/how-to-indent-in-python-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-how-to-indent-in-python-code&quot; markdown&gt;Click here to download the free sample code&lt;/a&gt; you’ll use to learn how to properly indent Python code.&lt;/p&gt;
&lt;/div&gt;
&lt;h2 id=&quot;how-to-indent-code-in-python&quot;&gt;How to Indent Code in Python&lt;a class=&quot;headerlink&quot; href=&quot;#how-to-indent-code-in-python&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;/ref/glossary/indentation/&quot; class=&quot;ref-link&quot;&gt;Indenting&lt;/a&gt; your code means adding spaces to the beginning of a line, which shifts the start of the line to the right, as shown below:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; aria-label=&quot;Code block&quot; data-syntax-language=&quot;python&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--blue&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot; aria-label=&quot;Language&quot;&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;number&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;7&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;number&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
&lt;span class=&quot;hll&quot;&gt;    &lt;span class=&quot;nb&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;It&#x27;s a positive number&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot;&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.5eccc70ec931.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 first two lines aren’t indented, while the third line is indented.&lt;/p&gt;
&lt;p&gt;How you indent your Python code depends on your coding environment. Most editors and &lt;a href=&quot;/ref/glossary/ide/&quot; class=&quot;ref-link&quot;&gt;integrated development environments (IDEs)&lt;/a&gt; can indent Python code correctly with little to no input from the user. You’ll see examples of this in the sections that follow.&lt;/p&gt;
&lt;h3 id=&quot;python-aware-editors&quot;&gt;Python-Aware Editors&lt;a class=&quot;headerlink&quot; href=&quot;#python-aware-editors&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;In most cases, you’ll be working in a Python-aware environment. This might be a full Python IDE such as &lt;a href=&quot;https://realpython.com/pycharm-guide/&quot;&gt;PyCharm&lt;/a&gt;, a code editor like &lt;a href=&quot;https://realpython.com/python-development-visual-studio-code/&quot;&gt;Visual Studio Code&lt;/a&gt;, the &lt;a href=&quot;https://realpython.com/python-repl/&quot;&gt;Python REPL&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/ipython-interactive-python-shell/&quot;&gt;IPython&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python-idle/&quot;&gt;IDLE&lt;/a&gt;, or even a &lt;a href=&quot;https://realpython.com/jupyter-notebook-introduction/&quot;&gt;Jupyter&lt;/a&gt; notebook. All these environments understand Python syntax and indent your code properly as you type.&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; &lt;a href=&quot;https://peps.python.org/pep-0008/&quot;&gt;PEP 8&lt;/a&gt; is the style guide for Python that was first introduced in 2001. Among other recommendations, it specifies that code indentation should be &lt;a href=&quot;https://peps.python.org/pep-0008/#indentation&quot;&gt;four spaces per indentation level&lt;/a&gt;. All environments discussed here follow that standard.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Here’s a small example to show this automatic indentation. You’ll use the following code to see how each environment automatically indents as you type:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; aria-label=&quot;Code block&quot; data-syntax-language=&quot;python&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--blue&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot; aria-label=&quot;Language&quot;&gt;Python&lt;/span&gt;
    &lt;span class=&quot;mr-2&quot; aria-label=&quot;Filename&quot;&gt;&lt;code style=&quot;color: inherit; background: inherit;&quot;&gt;lucky_number.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;linenos&quot;&gt; 1&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;lucky_number&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;7&lt;/span&gt;
&lt;span class=&quot;linenos&quot;&gt; 2&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;number&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;range&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
&lt;span class=&quot;linenos&quot;&gt; 3&lt;/span&gt;    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;number&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;lucky_number&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
&lt;span class=&quot;linenos&quot;&gt; 4&lt;/span&gt;        &lt;span class=&quot;nb&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Found the lucky number!&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;linenos&quot;&gt; 5&lt;/span&gt;    &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
&lt;span class=&quot;linenos&quot;&gt; 6&lt;/span&gt;        &lt;span class=&quot;nb&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sa&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;number&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; is not my lucky number.&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;linenos&quot;&gt; 7&lt;/span&gt;
&lt;span class=&quot;linenos&quot;&gt; 8&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Done.&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;&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.5eccc70ec931.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;p&gt;This example shows how indenting happens automatically and how to &lt;strong&gt;de-indent&lt;/strong&gt; a line of code. De-indenting—also called &lt;strong&gt;dedenting&lt;/strong&gt;—means removing spaces at the beginning of a line, which moves the start of the line to the left. The code on &lt;strong&gt;lines 5 and 8&lt;/strong&gt; needs to be de-indented relative to the previous lines to close the preceding &lt;a href=&quot;https://en.wikipedia.org/wiki/Block_(programming)&quot;&gt;code blocks&lt;/a&gt;. For a detailed explanation of the indentation in this code, expand the collapsible section below. &lt;/p&gt;
&lt;div class=&quot;card mb-3&quot; id=&quot;collapse_card9fbee3&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-toggle=&quot;collapse&quot; data-target=&quot;#collapse9fbee3&quot; aria-expanded=&quot;false&quot; aria-controls=&quot;collapse9fbee3&quot; markdown=&quot;1&quot;&gt;&lt;span class=&quot;float-left&quot; markdown=&quot;1&quot;&gt;Code Explanation&lt;/span&gt;&lt;span class=&quot;float-right 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-parent=&quot;#collapse_card9fbee3&quot; id=&quot;collapse9fbee3&quot;&gt;
&lt;div class=&quot;card-body&quot;&gt;
&lt;p&gt;The code above shows different levels of indentation, combining a &lt;code&gt;for&lt;/code&gt; loop with an &lt;code&gt;if&lt;/code&gt; statement:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Line 1&lt;/strong&gt; initializes the variable &lt;code&gt;lucky_number&lt;/code&gt; to the integer value of &lt;code&gt;7&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Line 2&lt;/strong&gt; starts a &lt;code&gt;for&lt;/code&gt; loop using &lt;code&gt;number&lt;/code&gt; as an iterator over a range of values from &lt;code&gt;0&lt;/code&gt; to &lt;code&gt;9&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Line 3&lt;/strong&gt; checks if &lt;code&gt;number&lt;/code&gt; is equal to &lt;code&gt;lucky_number&lt;/code&gt;. This line is indented to show it’s part of the &lt;code&gt;for&lt;/code&gt; loop’s body.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Line 4&lt;/strong&gt; prints a message when the condition &lt;code&gt;number == lucky_number&lt;/code&gt; is &lt;code&gt;True&lt;/code&gt;. This line is indented to show it’s part of the body of the &lt;code&gt;if&lt;/code&gt; statement.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Line 5&lt;/strong&gt; provides a way to act when the condition on &lt;strong&gt;line 3&lt;/strong&gt; is &lt;code&gt;False&lt;/code&gt;. This line is de-indented to show it’s part of the &lt;code&gt;if&lt;/code&gt; statement on &lt;strong&gt;line 3&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Line 6&lt;/strong&gt; prints a message when the condition &lt;code&gt;number == lucky_number&lt;/code&gt; is &lt;code&gt;False&lt;/code&gt;. This line is indented to show it’s part of the body of the &lt;code&gt;else&lt;/code&gt; clause.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Line 8&lt;/strong&gt; prints a final message. It’s de-indented to show it’s not part of the &lt;code&gt;for&lt;/code&gt; loop, but executes after the &lt;code&gt;for&lt;/code&gt; loop is done.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If any part of this code is unfamiliar to you, you can learn more by exploring these resources:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;For more on &lt;code&gt;for&lt;/code&gt; loops, read &lt;a href=&quot;https://realpython.com/python-for-loop/&quot;&gt;Python &lt;code&gt;for&lt;/code&gt; Loops: The Pythonic Way&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;For more on &lt;code&gt;range()&lt;/code&gt;, read &lt;a href=&quot;https://realpython.com/python-range/&quot;&gt;Python &lt;code&gt;range()&lt;/code&gt;: Represent Numerical Ranges&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;For more on &lt;code&gt;if&lt;/code&gt; and &lt;code&gt;else&lt;/code&gt; clauses, read &lt;a href=&quot;https://realpython.com/python-conditional-statements/&quot;&gt;Conditional Statements in Python&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;For more on the &lt;code&gt;print()&lt;/code&gt; function, read &lt;a href=&quot;https://realpython.com/python-print/&quot;&gt;Your Guide to the Python &lt;code&gt;print()&lt;/code&gt; Function&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;For more on f-string formatting, read &lt;a href=&quot;https://realpython.com/python-f-strings/&quot;&gt;Python’s F-String for String Interpolation and Formatting&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Each line of the code above exists at a specific &lt;a href=&quot;https://docs.python.org/3/reference/lexical_analysis.html#indentation&quot;&gt;indentation level&lt;/a&gt;. All consecutive statements at the same indentation level are considered to be part of the same group or code block. The table below shows each line of code from the example, its indentation level, and what action is needed to achieve that level:&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;Code&lt;/th&gt;
&lt;th&gt;Indentation Level&lt;/th&gt;
&lt;th&gt;Action&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;lucky_number = 7&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;for number in range(10):&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;if number == lucky_number:&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;Indent&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;print(&quot;Found the lucky number!&quot;)&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;Indent&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;else:&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;De-indent&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;print(f&quot;{number} is not my lucky number.&quot;)&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;Indent&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;print(&quot;Done.&quot;)&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;De-indent&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;First, here’s what it looks like to enter this code in PyCharm, a full-featured Python IDE:&lt;/p&gt;
&lt;figure&gt;
  &lt;div class=&quot;embed-responsive embed-responsive-16by9 rounded mb-3 border&quot;&gt;
    &lt;iframe loading=&quot;lazy&quot; class=&quot;embed-responsive-item&quot; src=&quot;https://player.vimeo.com/video/1134701175?background=1&quot; frameborder=&quot;0&quot; allow=&quot;fullscreen&quot; allowfullscreen&gt;&lt;/iframe&gt;
  &lt;/div&gt;

&lt;/figure&gt;

&lt;p&gt;Notice that as you hit &lt;span class=&quot;keys&quot;&gt;&lt;kbd class=&quot;key-enter&quot;&gt;Enter&lt;/kbd&gt;&lt;/span&gt; on &lt;strong&gt;line 2&lt;/strong&gt;, PyCharm immediately indents &lt;strong&gt;line 3&lt;/strong&gt; for you. The same thing happens on &lt;strong&gt;line 4&lt;/strong&gt;. However, to de-indent &lt;strong&gt;line 5&lt;/strong&gt; and &lt;strong&gt;line 8&lt;/strong&gt;, you have to either press &lt;span class=&quot;keys&quot;&gt;&lt;kbd class=&quot;key-backspace&quot;&gt;Backspace&lt;/kbd&gt;&lt;/span&gt; or &lt;span class=&quot;keys&quot;&gt;&lt;kbd class=&quot;key-shift&quot;&gt;Shift&lt;/kbd&gt;&lt;span&gt;+&lt;/span&gt;&lt;kbd class=&quot;key-tab&quot;&gt;Tab&lt;/kbd&gt;&lt;/span&gt; to move the cursor back to the proper position for the next line.&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/how-to-indent-in-python/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/how-to-indent-in-python/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast – Episode #275: Building a FastAPI Application &amp; Exploring Python Concurrency</title>
      <id>https://realpython.com/podcasts/rpp/275/</id>
      <link href="https://realpython.com/podcasts/rpp/275/"/>
      <updated>2025-11-21T12:00:00+00:00</updated>
      <summary>What are the steps to get started building a FastAPI application? What are the different types of concurrency available in Python? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder&#x27;s Weekly articles and projects.</summary>
      <content type="html">
        &lt;p&gt;What are the steps to get started building a FastAPI application? What are the different types of concurrency available in Python? Christopher Trudeau is back on the show this week, bringing 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>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>2025-11-19T14: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-toggle=&quot;modal&quot; data-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.5eccc70ec931.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-xs-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;embed-responsive embed-responsive-16by9&quot;&gt;

            &lt;img class=&quot;card-img-top m-0 p-0 embed-responsive-item 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.5eccc70ec931.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&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;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; aria-label=&quot;Code block&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;mr-2 noselect&quot; aria-label=&quot;Language&quot;&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; role=&quot;button&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.5eccc70ec931.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;mcp&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;openai
&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;&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.5eccc70ec931.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;p&gt;Finally, you have the &lt;a href=&quot;https://realpython.com/python-pyproject-toml/&quot;&gt;&lt;code&gt;pyproject.toml&lt;/code&gt;&lt;/a&gt; file, which you’ll use to prepare your project for building and distribution.&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: Build a Python MCP Client to Test Servers From Your Terminal</title>
      <id>https://realpython.com/quizzes/python-mcp-client/</id>
      <link href="https://realpython.com/quizzes/python-mcp-client/"/>
      <updated>2025-11-19T12:00:00+00:00</updated>
      <summary>Learn how to create a Python MCP client, start an AI-powered chat session, and run it from the command line. Check your understanding.</summary>
      <content type="html">
        &lt;p&gt;In this quiz, you&amp;rsquo;ll test your understanding of how to &lt;a href=&quot;https://realpython.com/python-mcp-client/&quot;&gt;Build a Python MCP Client to Test Servers From Your Terminal&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit how to add a minimal chat interface, create an AI handler to power the chat, handle runtime errors, and update the entry point to run the chat from the command line.&lt;/p&gt;
&lt;p&gt;You will confirm when to initialize the AI handler and how to surface clear error messages to users. For a guided review, see the linked tutorial.&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>Break Out of Loops With Python&#x27;s break Keyword</title>
      <id>https://realpython.com/courses/break-out-of-loops-break-keyword/</id>
      <link href="https://realpython.com/courses/break-out-of-loops-break-keyword/"/>
      <updated>2025-11-18T14:00:00+00:00</updated>
      <summary>Learn how Python’s break lets you exit for and while loops early, with practical demos from simple games to everyday data tasks.</summary>
      <content type="html">
        &lt;p&gt;In Python, the &lt;a href=&quot;/ref/keywords/break/&quot; class=&quot;ref-link&quot;&gt;&lt;code&gt;break&lt;/code&gt; statement&lt;/a&gt; lets you exit a loop prematurely, transferring control to the code that follows the loop. This tutorial guides you through using &lt;code&gt;break&lt;/code&gt; in both &lt;code&gt;for&lt;/code&gt; and &lt;code&gt;while&lt;/code&gt; loops. You&amp;rsquo;ll also briefly explore the &lt;code&gt;continue&lt;/code&gt; keyword, which complements &lt;code&gt;break&lt;/code&gt; by skipping the current loop iteration.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;By the end of this video course, you&amp;rsquo;ll understand that:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;A &lt;code&gt;break&lt;/code&gt; in Python&lt;/strong&gt; is a keyword that lets you exit a loop immediately, stopping further iterations.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Using &lt;code&gt;break&lt;/code&gt; outside of loops&lt;/strong&gt; doesn&amp;rsquo;t make sense because it&amp;rsquo;s specifically designed to exit loops early.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The &lt;code&gt;break&lt;/code&gt; doesn&amp;rsquo;t exit all loops&lt;/strong&gt;, only the innermost loop that contains it.&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>How to Serve a Website With FastAPI Using HTML and Jinja2</title>
      <id>https://realpython.com/fastapi-jinja2-template/</id>
      <link href="https://realpython.com/fastapi-jinja2-template/"/>
      <updated>2025-11-17T14:00:00+00:00</updated>
      <summary>Use FastAPI to render Jinja2 templates and serve dynamic sites with HTML, CSS, and JavaScript, then add a color picker that copies hex codes.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;By the end of this guide, you’ll be able to serve dynamic websites from FastAPI endpoints using Jinja2 templates powered by CSS and JavaScript. By leveraging FastAPI’s &lt;code&gt;HTMLResponse&lt;/code&gt;, &lt;code&gt;StaticFiles&lt;/code&gt;, and &lt;code&gt;Jinja2Templates&lt;/code&gt; classes, you’ll use FastAPI like a traditional Python web framework.&lt;/p&gt;
&lt;p&gt;You’ll start by returning basic HTML from your endpoints, then add Jinja2 templating for dynamic content, and finally create a complete website with external CSS and JavaScript files to copy hex color codes:&lt;/p&gt;
&lt;figure&gt;
  &lt;div class=&quot;embed-responsive embed-responsive-16by9 rounded mb-3 border&quot;&gt;
    &lt;iframe loading=&quot;lazy&quot; class=&quot;embed-responsive-item&quot; src=&quot;https://player.vimeo.com/video/1125850720?background=1&quot; frameborder=&quot;0&quot; allow=&quot;fullscreen&quot; allowfullscreen&gt;&lt;/iframe&gt;
  &lt;/div&gt;

&lt;/figure&gt;

&lt;p&gt;To follow along, you should be comfortable with &lt;a href=&quot;https://realpython.com/defining-your-own-python-function/&quot;&gt;Python functions&lt;/a&gt; and have a basic understanding of &lt;a href=&quot;https://realpython.com/html-css-python/&quot;&gt;HTML and CSS&lt;/a&gt;. Experience with &lt;a href=&quot;https://realpython.com/get-started-with-fastapi/&quot;&gt;FastAPI&lt;/a&gt; is helpful but not required.&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/fastapi-jinja2-template-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-fastapi-jinja2-template-code&quot; markdown&gt;Click here to download the free sample code&lt;/a&gt; that shows you how to serve a website with FastAPI using HTML and Jinja2.&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.5eccc70ec931.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 Serve a Website With FastAPI Using HTML and Jinja2” 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-xs-12 col-sm-4 col-md-3 align-self-center&quot;&gt;

      &lt;a href=&quot;/quizzes/fastapi-jinja2-template/&quot; tabindex=&quot;-1&quot;&gt;
        &lt;div class=&quot;embed-responsive embed-responsive-16by9&quot;&gt;

            &lt;img class=&quot;card-img-top m-0 p-0 embed-responsive-item rounded&quot; style=&quot;object-fit: contain; background: #abe0e6;&quot; alt=&quot;How to Serve a Website With FastAPI Using HTML and Jinja2&quot; src=&quot;https://files.realpython.com/media/How-to-Serve-HTML-With-FastAPI-Using-Jinja2-Templates_Watermarked.b3816f1c8f90.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-Serve-HTML-With-FastAPI-Using-Jinja2-Templates_Watermarked.b3816f1c8f90.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/How-to-Serve-HTML-With-FastAPI-Using-Jinja2-Templates_Watermarked.b3816f1c8f90.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/How-to-Serve-HTML-With-FastAPI-Using-Jinja2-Templates_Watermarked.b3816f1c8f90.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/How-to-Serve-HTML-With-FastAPI-Using-Jinja2-Templates_Watermarked.b3816f1c8f90.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.5eccc70ec931.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&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/fastapi-jinja2-template/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;How to Serve a Website With FastAPI Using HTML and Jinja2&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;Review how to build dynamic websites with FastAPI and Jinja2, and serve HTML, CSS, and JS with HTMLResponse and StaticFiles.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&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;Before you start building your HTML-serving &lt;a href=&quot;https://fastapi.tiangolo.com/&quot;&gt;FastAPI application&lt;/a&gt;, you’ll need to set up your development environment with the required &lt;a href=&quot;/ref/glossary/package/&quot; class=&quot;ref-link&quot;&gt;packages&lt;/a&gt;. You’ll install FastAPI along with its standard dependencies, including the &lt;a href=&quot;https://fastapi.tiangolo.com/deployment/manually/#asgi-servers&quot;&gt;ASGI server&lt;/a&gt; you need to run your application.&lt;/p&gt;
&lt;p&gt;Select your operating system below and install FastAPI with all the standard dependencies inside a &lt;a href=&quot;https://realpython.com/python-virtual-environments-a-primer/&quot;&gt;virtual environment&lt;/a&gt;:&lt;/p&gt;
&lt;ul class=&quot;nav nav-tabs justify-content-end js-platform-widget-tabs&quot; role=&quot;tablist&quot;&gt;

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




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

&lt;/ul&gt;
&lt;div class=&quot;tab-content mt-2 mb-0 js-platform-widget-content&quot;&gt;
&lt;div aria-labelledby=&quot;windows-tab-1&quot; class=&quot;tab-pane fade show active&quot; id=&quot;windows-1&quot; role=&quot;tabpanel&quot;&gt;
&lt;code-block class=&quot;mb-3&quot; aria-label=&quot;Code block&quot; data-syntax-language=&quot;pscon&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot; aria-label=&quot;Language&quot;&gt;Windows PowerShell&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; role=&quot;button&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.5eccc70ec931.svg#regular--rectangle-terminal&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;PS&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;python&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;-m&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;venv&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;venv&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;PS&amp;gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.\&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;venv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;\&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Scripts&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;\&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;activate&lt;/span&gt;
&lt;span class=&quot;gp gp-VirtualEnv&quot;&gt;(venv)&lt;/span&gt; &lt;span class=&quot;gp&quot;&gt;PS&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;python&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;-m&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pip&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;install&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;fastapi[standard]&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;&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.5eccc70ec931.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;/div&gt;
&lt;div aria-labelledby=&quot;linux-macos-tab-1&quot; class=&quot;tab-pane fade &quot; id=&quot;linux-macos-1&quot; role=&quot;tabpanel&quot;&gt;
&lt;code-block class=&quot;mb-3&quot; aria-label=&quot;Code block&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;mr-2 noselect&quot; aria-label=&quot;Language&quot;&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; role=&quot;button&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.5eccc70ec931.svg#regular--rectangle-terminal&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;python&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;-m&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;venv&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;venv
&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;source&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;venv/bin/activate
&lt;span class=&quot;gp gp-VirtualEnv&quot;&gt;(venv)&lt;/span&gt; &lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;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;s2&quot;&gt;&quot;fastapi[standard]&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;&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.5eccc70ec931.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;These commands create and activate a &lt;a href=&quot;/ref/glossary/virtual-environment/&quot; class=&quot;ref-link&quot;&gt;virtual environment&lt;/a&gt;, then install FastAPI along with &lt;a href=&quot;https://www.uvicorn.org/&quot;&gt;Uvicorn&lt;/a&gt; as the ASGI server, and additional dependencies that enhance FastAPI’s functionality. The &lt;code&gt;standard&lt;/code&gt; option ensures you have everything you need for this tutorial, including &lt;a href=&quot;https://jinja.palletsprojects.com/en/stable/&quot;&gt;Jinja2&lt;/a&gt; for templating.&lt;/p&gt;
&lt;h2 id=&quot;step-1-return-basic-html-over-an-api-endpoint&quot;&gt;Step 1: Return Basic HTML Over an API Endpoint&lt;a class=&quot;headerlink&quot; href=&quot;#step-1-return-basic-html-over-an-api-endpoint&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;When you take &lt;a href=&quot;https://realpython.com/fastapi-python-web-apis/&quot;&gt;a close look at a FastAPI example application&lt;/a&gt;, you commonly encounter functions returning &lt;a href=&quot;/ref/glossary/dictionary/&quot; class=&quot;ref-link&quot;&gt;dictionaries&lt;/a&gt;, which the framework transparently &lt;a href=&quot;https://realpython.com/python-serialize-data/&quot;&gt;serializes&lt;/a&gt; into &lt;a href=&quot;https://realpython.com/python-json/&quot;&gt;JSON&lt;/a&gt; responses.&lt;/p&gt;
&lt;p&gt;However, FastAPI’s flexibility allows you to serve various &lt;a href=&quot;https://fastapi.tiangolo.com/advanced/custom-response/&quot;&gt;custom responses&lt;/a&gt; besides that—for example, &lt;code&gt;HTMLResponse&lt;/code&gt; to return content as a &lt;code&gt;text/html&lt;/code&gt; type, which your browser interprets as a web page.&lt;/p&gt;
&lt;p&gt;To explore returning HTML with FastAPI, create a new file called &lt;code&gt;main.py&lt;/code&gt; and build your first HTML-returning endpoint:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; aria-label=&quot;Code block&quot; data-syntax-language=&quot;python&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--blue&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot; aria-label=&quot;Language&quot;&gt;Python&lt;/span&gt;
    &lt;span class=&quot;mr-2&quot; aria-label=&quot;Filename&quot;&gt;&lt;code style=&quot;color: inherit; background: inherit;&quot;&gt;main.py&lt;/code&gt;&lt;/span&gt;
    &lt;div class=&quot;noselect&quot;&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nn&quot;&gt;fastapi&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;FastAPI&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nn&quot;&gt;fastapi.responses&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;HTMLResponse&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;app&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;FastAPI&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;

&lt;span class=&quot;nd&quot;&gt;@app&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;/&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;response_class&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;HTMLResponse&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;home&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;():&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;html_content&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&quot;&quot;&lt;/span&gt;
&lt;span class=&quot;s2&quot;&gt;    &amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class=&quot;s2&quot;&gt;    &amp;lt;html lang=&quot;en&quot;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;s2&quot;&gt;    &amp;lt;head&amp;gt;&lt;/span&gt;
&lt;span class=&quot;s2&quot;&gt;        &amp;lt;meta charset=&quot;UTF-8&quot;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;s2&quot;&gt;        &amp;lt;title&amp;gt;Home&amp;lt;/title&amp;gt;&lt;/span&gt;
&lt;span class=&quot;s2&quot;&gt;    &amp;lt;/head&amp;gt;&lt;/span&gt;
&lt;span class=&quot;s2&quot;&gt;    &amp;lt;body&amp;gt;&lt;/span&gt;
&lt;span class=&quot;s2&quot;&gt;        &amp;lt;h1&amp;gt;Welcome to FastAPI!&amp;lt;/h1&amp;gt;&lt;/span&gt;
&lt;span class=&quot;s2&quot;&gt;    &amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class=&quot;s2&quot;&gt;    &amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;span class=&quot;s2&quot;&gt;    &quot;&quot;&quot;&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;html_content&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;&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.5eccc70ec931.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;p&gt;The &lt;code&gt;HTMLResponse&lt;/code&gt; class tells FastAPI to return your content with the &lt;code&gt;text/html&lt;/code&gt; content type instead of the default &lt;code&gt;application/json&lt;/code&gt; response. This ensures that browsers interpret your response as HTML rather than plain text.&lt;/p&gt;
&lt;p&gt;Before you can visit your home page, you need to start your FastAPI development server to see the HTML response in action:&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/fastapi-jinja2-template/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/fastapi-jinja2-template/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Quiz: How to Serve a Website With FastAPI Using HTML and Jinja2</title>
      <id>https://realpython.com/quizzes/fastapi-jinja2-template/</id>
      <link href="https://realpython.com/quizzes/fastapi-jinja2-template/"/>
      <updated>2025-11-17T12:00:00+00:00</updated>
      <summary>Review how to build dynamic websites with FastAPI and Jinja2, and serve HTML, CSS, and JS with HTMLResponse and StaticFiles.</summary>
      <content type="html">
        &lt;p&gt;In this quiz, you&amp;rsquo;ll test your understanding of building dynamic websites with &lt;a href=&quot;https://realpython.com/fastapi-jinja2-template/&quot;&gt;FastAPI and Jinja2 Templates&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit how to return HTML with &lt;code&gt;HTMLResponse&lt;/code&gt;, serve assets with &lt;code&gt;StaticFiles&lt;/code&gt;, render Jinja2 templates with context, and include CSS and JavaScript for interactivity like copying hex color codes.&lt;/p&gt;
&lt;p&gt;If you are new to FastAPI, review &lt;a href=&quot;https://realpython.com/get-started-with-fastapi/&quot;&gt;Get Started With FastAPI&lt;/a&gt;. You can also brush up on &lt;a href=&quot;https://realpython.com/defining-your-own-python-function/&quot;&gt;Python functions&lt;/a&gt; and &lt;a href=&quot;https://realpython.com/html-css-python/&quot;&gt;HTML and CSS&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>The Real Python Podcast – Episode #274: Preparing Data Science Projects for Production</title>
      <id>https://realpython.com/podcasts/rpp/274/</id>
      <link href="https://realpython.com/podcasts/rpp/274/"/>
      <updated>2025-11-14T12:00:00+00:00</updated>
      <summary>How do you prepare your Python data science projects for production? What are the essential tools and techniques to make your code reproducible, organized, and testable? This week on the show, Khuyen Tran from CodeCut discusses her new book, &quot;Production Ready Data Science.&quot;</summary>
      <content type="html">
        &lt;p&gt;How do you prepare your Python data science projects for production? What are the essential tools and techniques to make your code reproducible, organized, and testable? This week on the show, Khuyen Tran from CodeCut discusses her new book, &quot;Production Ready Data Science.&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 Python Standard REPL: Try Out Code and Ideas Quickly</title>
      <id>https://realpython.com/python-repl/</id>
      <link href="https://realpython.com/python-repl/"/>
      <updated>2025-11-12T14:00:00+00:00</updated>
      <summary>The Python REPL gives you instant feedback as you code. Learn to use this powerful tool to type, run, debug, edit, and explore Python interactively.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;The Python standard REPL (Read-Eval-Print Loop) lets you run code interactively, test ideas, and get instant feedback. You start it by running the &lt;code&gt;python&lt;/code&gt; command, which opens an interactive shell included in every Python installation.&lt;/p&gt;
&lt;p&gt;In this tutorial, you’ll learn how to use the Python REPL to execute code, edit and navigate code history, introspect objects, and customize the REPL for a smoother coding workflow.&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 enter and run &lt;strong&gt;simple&lt;/strong&gt; or &lt;strong&gt;compound&lt;/strong&gt; statements in a REPL session.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;implicit &lt;code&gt;_&lt;/code&gt; variable&lt;/strong&gt; stores the result of the last evaluated expression and can be reused in later expressions.&lt;/li&gt;
&lt;li&gt;You can &lt;strong&gt;reload&lt;/strong&gt; modules dynamically with &lt;code&gt;importlib.reload()&lt;/code&gt; to test updates without restarting the REPL.&lt;/li&gt;
&lt;li&gt;The modern Python REPL supports &lt;strong&gt;auto-indentation&lt;/strong&gt;, &lt;strong&gt;history navigation&lt;/strong&gt;, &lt;strong&gt;syntax highlighting&lt;/strong&gt;, &lt;strong&gt;quick commands&lt;/strong&gt;, and &lt;strong&gt;autocompletion&lt;/strong&gt;, which improves your user experience.&lt;/li&gt;
&lt;li&gt;You can &lt;strong&gt;customize the REPL&lt;/strong&gt; with a startup file, color themes, and third-party libraries like Rich for a better experience.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;With these skills, you can move beyond just running short code snippets and start using the Python REPL as a flexible environment for testing, debugging, and exploring new ideas.&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-repl-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-python-repl-code&quot; markdown&gt;Click here to download the free sample code&lt;/a&gt; that you’ll use to explore the capabilities of Python’s standard REPL.&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.5eccc70ec931.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 “The Python Standard REPL: Try Out Code and Ideas Quickly” 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-xs-12 col-sm-4 col-md-3 align-self-center&quot;&gt;

      &lt;a href=&quot;/quizzes/python-repl/&quot; tabindex=&quot;-1&quot;&gt;
        &lt;div class=&quot;embed-responsive embed-responsive-16by9&quot;&gt;

            &lt;img class=&quot;card-img-top m-0 p-0 embed-responsive-item rounded&quot; style=&quot;object-fit: contain; background: #e5c5ac;&quot; alt=&quot;The Python Standard REPL: Try Out Code and Ideas Quickly&quot; src=&quot;https://files.realpython.com/media/How-to-Use-the-Interactive-Python-REPL_Watermarked.dce4d5791b83.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-Use-the-Interactive-Python-REPL_Watermarked.dce4d5791b83.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/How-to-Use-the-Interactive-Python-REPL_Watermarked.dce4d5791b83.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/How-to-Use-the-Interactive-Python-REPL_Watermarked.dce4d5791b83.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/How-to-Use-the-Interactive-Python-REPL_Watermarked.dce4d5791b83.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.5eccc70ec931.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&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-repl/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;The Python Standard REPL: Try Out Code and Ideas Quickly&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;Test your understanding of the Python standard REPL. The Python REPL allows you to run Python code interactively, which is useful for testing new ideas, exploring libraries, refactoring and debugging code, and trying out examples.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;

&lt;h2 id=&quot;getting-to-know-the-python-standard-repl&quot;&gt;Getting to Know the Python Standard REPL&lt;a class=&quot;headerlink&quot; href=&quot;#getting-to-know-the-python-standard-repl&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;In computer programming, you’ll find two kinds of programming languages: &lt;strong&gt;compiled&lt;/strong&gt; and &lt;strong&gt;interpreted&lt;/strong&gt; languages. Compiled languages like &lt;a href=&quot;https://realpython.com/c-for-python-programmers/&quot;&gt;C&lt;/a&gt; and &lt;a href=&quot;https://realpython.com/python-vs-cpp/&quot;&gt;C++&lt;/a&gt; have an associated &lt;a href=&quot;https://en.wikipedia.org/wiki/Compiler&quot;&gt;compiler&lt;/a&gt; program that converts the language’s code into &lt;a href=&quot;https://en.wikipedia.org/wiki/Machine_code&quot;&gt;machine code&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This machine code is typically saved in an executable file. Once you have an executable, you can run your program on any compatible computer system without needing the compiler or the source code.&lt;/p&gt;
&lt;p&gt;In contrast, interpreted languages like Python need an &lt;a href=&quot;https://en.wikipedia.org/wiki/Interpreter_(computing)&quot;&gt;interpreter&lt;/a&gt; program. This means that you need to have a Python interpreter installed on your computer to run Python code. Some may consider this characteristic a drawback because it can make your code distribution process much more difficult.&lt;/p&gt;
&lt;p&gt;However, in Python, having an interpreter offers one significant advantage that comes in handy during your development and testing process. The Python interpreter allows for what’s known as an interactive &lt;a href=&quot;/ref/glossary/repl/&quot; class=&quot;ref-link&quot;&gt;&lt;strong&gt;Read-Eval-Print Loop (REPL)&lt;/strong&gt;&lt;/a&gt;, or shell, which reads a piece of code, evaluates it, and then prints the result to the console in a &lt;a href=&quot;/ref/glossary/loop/&quot; class=&quot;ref-link&quot;&gt;loop&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The Python REPL is a built-in interactive coding playground that you can start by typing &lt;code&gt;python&lt;/code&gt; in your terminal. Once in a REPL session, you can run Python code:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; aria-label=&quot;Code block&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;mr-2 noselect&quot; aria-label=&quot;Language&quot;&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; role=&quot;button&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.5eccc70ec931.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;s2&quot;&gt;&quot;Python!&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;Python!Python!Python!&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;40&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;go&quot;&gt;42&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;&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.5eccc70ec931.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;p&gt;In the REPL, you can use Python as a calculator, but also try any Python code you can think of, and much more! Jump to &lt;a href=&quot;#starting-and-terminating-repl-interactive-sessions&quot;&gt;starting and terminating REPL interactive sessions&lt;/a&gt; if you want to get your hands dirty right away, or keep reading to gather more background context first.&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 this tutorial, you’ll learn about the &lt;a href=&quot;https://realpython.com/cpython-source-code-guide/&quot;&gt;CPython&lt;/a&gt; standard REPL, which is available in all the installers of this Python distribution. If you don’t have CPython yet, then check out &lt;a href=&quot;https://realpython.com/installing-python/&quot;&gt;How to Install Python on Your System: A Guide&lt;/a&gt; for detailed instructions.&lt;/p&gt;
&lt;p&gt;The standard REPL has changed significantly since &lt;a href=&quot;https://realpython.com/python313-new-features/&quot;&gt;Python 3.13&lt;/a&gt; was released. Several limitations from earlier versions have been lifted. Throughout this tutorial, version differences are indicated when appropriate.&lt;/p&gt;
&lt;p&gt;To dive deeper into the new REPL features, check out these resources:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/python313-repl/&quot;&gt;Python 3.13 Preview: A Modern REPL&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/python-repl-autocompletion-highlighting/&quot;&gt;Python 3.14 Preview: REPL Autocompletion and Highlighting&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;p&gt;The Python interpreter can execute Python code in two modes:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/run-python-scripts/&quot;&gt;Script&lt;/a&gt;, or program&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/interacting-with-python/&quot;&gt;Interactive&lt;/a&gt;, or REPL&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;In &lt;strong&gt;script mode&lt;/strong&gt;, you use the interpreter to run a source file—typically a &lt;code&gt;.py&lt;/code&gt; file—as an executable program. In this case, Python loads the file’s content and runs the code line by line, following the script or program’s execution flow.&lt;/p&gt;
&lt;p&gt;Alternatively, &lt;strong&gt;interactive mode&lt;/strong&gt; is when you launch the interpreter using the &lt;code&gt;python&lt;/code&gt; command and use it as a platform to run code that you type in directly.&lt;/p&gt;
&lt;p&gt;In this tutorial, you’ll learn how to use the Python standard REPL to run code interactively, which allows you to try ideas and test concepts when using and learning Python. Are you ready to take a closer look at the Python REPL? Keep reading!&lt;/p&gt;
&lt;h3 id=&quot;what-is-pythons-interactive-shell-or-repl&quot;&gt;What Is Python’s Interactive Shell or REPL?&lt;a class=&quot;headerlink&quot; href=&quot;#what-is-pythons-interactive-shell-or-repl&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;When you run the Python interpreter in interactive mode, you open an &lt;strong&gt;interactive shell&lt;/strong&gt;, also known as an &lt;strong&gt;interactive session&lt;/strong&gt;. In this &lt;a href=&quot;https://en.wikipedia.org/wiki/Shell_(computing)&quot;&gt;shell&lt;/a&gt;, your keyboard is the input source, and your screen is the output destination.&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 this tutorial, the terms &lt;strong&gt;interactive shell&lt;/strong&gt;, &lt;strong&gt;interactive session&lt;/strong&gt;, &lt;strong&gt;interpreter session&lt;/strong&gt;, and &lt;strong&gt;REPL session&lt;/strong&gt; are used interchangeably.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Here’s how the REPL works: it takes input consisting of Python code, which the interpreter parses and evaluates. Next, the interpreter displays the result on your screen, and the process starts again as a loop.&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python-repl/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-repl/ »&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 Operators and Expressions</title>
      <id>https://realpython.com/courses/python-operators-expressions/</id>
      <link href="https://realpython.com/courses/python-operators-expressions/"/>
      <updated>2025-11-11T14:00:00+00:00</updated>
      <summary>Operators let you combine objects to create expressions that perform computations -- the core of how Python works.</summary>
      <content type="html">
        &lt;p&gt;Python operators enable you to perform computations by combining objects and operators into expressions. Understanding Python operators is essential for manipulating data effectively.&lt;/p&gt;
&lt;p&gt;This video course covers arithmetic, comparison, Boolean, identity, membership, bitwise, concatenation, and repetition operators, along with augmented assignment operators. You&amp;rsquo;ll also learn how to build expressions using these operators and explore operator precedence to understand the order of operations in complex expressions.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;By the end of this video course, you&amp;rsquo;ll understand that:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Arithmetic operators&lt;/strong&gt; perform mathematical calculations on numeric values.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Comparison operators&lt;/strong&gt; evaluate relationships between values, returning &lt;strong&gt;Boolean&lt;/strong&gt; results.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Boolean operators&lt;/strong&gt; create compound logical expressions.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Identity operators&lt;/strong&gt; determine if two operands refer to the same object.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Membership operators&lt;/strong&gt; check for the presence of a value in a container.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Bitwise operators&lt;/strong&gt; manipulate data at the binary level.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Concatenation and repetition operators&lt;/strong&gt; manipulate sequence data types.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Augmented assignment operators&lt;/strong&gt; simplify expressions involving the same variable.&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>Python 3.14 Released and Other Python News for November 2025</title>
      <id>https://realpython.com/python-news-november-2025/</id>
      <link href="https://realpython.com/python-news-november-2025/"/>
      <updated>2025-11-10T14:00:00+00:00</updated>
      <summary>Python 3.14 is officially out, Python 3.15 begins, and Python 3.9 reaches end of life. Plus, Django 6.0 first beta released, new PEPs, and more Python news.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Python 3.14 is out now, bringing t-strings, deferred annotations, better error messages, and plenty more to explore. As developers start adopting the new version, Python 3.15 begins its alpha phase, and Python 3.9 officially retires. Meanwhile, Django 6.0 enters beta, new PEPs propose lazy imports and changes to the &lt;code&gt;assert&lt;/code&gt; syntax, and the PSF makes waves with a notable funding decision.&lt;/p&gt;
&lt;p&gt;Here’s what’s been happening in the world of Python!&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown&gt;Join Now:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/newsletter/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-newsletter&quot; markdown&gt;Click here to join the Real Python Newsletter&lt;/a&gt; and you’ll never miss another Python tutorial, course, or news update.&lt;/p&gt;
&lt;/div&gt;
&lt;h2 id=&quot;python-releases&quot;&gt;Python Releases&lt;a class=&quot;headerlink&quot; href=&quot;#python-releases&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Last month’s headline news was the release of &lt;strong&gt;Python 3.14&lt;/strong&gt;—a milestone update that introduces significant enhancements to the language itself and its runtime. Meanwhile, hot on its heels, the core team has begun development of &lt;strong&gt;Python 3.15&lt;/strong&gt;. As Python continues to evolve, we must also bid farewell to an older release. &lt;strong&gt;Python 3.9&lt;/strong&gt; has reached its end of life, reminding everyone to keep their environments up to date for safety and support.&lt;/p&gt;
&lt;h3 id=&quot;python-314-final-released&quot;&gt;Python 3.14 Final Released&lt;a class=&quot;headerlink&quot; href=&quot;#python-314-final-released&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://www.python.org/downloads/release/python-3140/&quot;&gt;Python 3.14.0&lt;/a&gt; was released on &lt;a href=&quot;https://peps.python.org/pep-0745/&quot;&gt;October 7, 2025&lt;/a&gt;, delivering a packed set of improvements and new capabilities. This is a major release that the community has been eagerly awaiting, and it doesn’t disappoint. Some of the most notable features of Python 3.14 include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&quot;https://realpython.com/python-annotations/&quot;&gt;Deferred annotations by default&lt;/a&gt;:&lt;/strong&gt; Following years of work on &lt;a href=&quot;https://peps.python.org/pep-0563/&quot;&gt;PEP 563&lt;/a&gt;, &lt;a href=&quot;https://peps.python.org/pep-0649/&quot;&gt;PEP 649&lt;/a&gt;, and &lt;a href=&quot;https://peps.python.org/pep-0749/&quot;&gt;PEP 749&lt;/a&gt;, Python now evaluates &lt;a href=&quot;/ref/glossary/annotation/&quot; class=&quot;ref-link&quot;&gt;type annotations&lt;/a&gt; lazily. Forward references in annotations no longer need a special &lt;code&gt;__future__&lt;/code&gt; import, and a new &lt;code&gt;annotationlib&lt;/code&gt; module provides tools to introspect annotations as real objects instead of strings.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&quot;https://realpython.com/python-t-strings/&quot;&gt;Template strings (t-strings)&lt;/a&gt;:&lt;/strong&gt; &lt;a href=&quot;https://peps.python.org/pep-0750/&quot;&gt;PEP 750&lt;/a&gt; introduces t-strings, a new string literal prefix &lt;code&gt;t&quot;&quot;&lt;/code&gt; that returns a &lt;code&gt;Template&lt;/code&gt; object, capturing both static and interpolated parts of the string. This feature enables custom processing of string templates and safer substitution patterns, offering a more controlled alternative to &lt;a href=&quot;https://realpython.com/python-f-strings/&quot;&gt;f-strings&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&quot;https://realpython.com/python-repl-autocompletion-highlighting/&quot;&gt;Modernized REPL&lt;/a&gt; and &lt;a href=&quot;https://realpython.com/python314-error-messages/&quot;&gt;error messages&lt;/a&gt;:&lt;/strong&gt; Building on improvements from &lt;a href=&quot;https://realpython.com/python313-new-features/&quot;&gt;Python 3.13&lt;/a&gt;, the interactive &lt;a href=&quot;https://realpython.com/python-repl/&quot;&gt;Python REPL&lt;/a&gt; gets real-time syntax highlighting and smarter auto-completion. Syntax and runtime errors are also more informative and user-friendly, helping developers diagnose issues faster.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Multiple interpreters in the standard library:&lt;/strong&gt; &lt;a href=&quot;https://peps.python.org/pep-0734/&quot;&gt;PEP 734&lt;/a&gt; adds a &lt;code&gt;concurrent.interpreters&lt;/code&gt; module, finally exposing Python’s long-existing &lt;a href=&quot;https://realpython.com/python312-subinterpreters/&quot;&gt;multiple interpreter support&lt;/a&gt; to Python code. This allows spawning isolated interpreters within a single process, unlocking new &lt;a href=&quot;https://realpython.com/python-concurrency/&quot;&gt;concurrency&lt;/a&gt; models and multi-core usage without separate processes.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Free-threaded Python:&lt;/strong&gt; An officially supported &lt;a href=&quot;https://realpython.com/python313-free-threading-jit/&quot;&gt;build variant&lt;/a&gt; allows running Python without the &lt;a href=&quot;https://realpython.com/python-gil/&quot;&gt;Global Interpreter Lock (GIL)&lt;/a&gt;, paving the way for true multi-core parallelism.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In addition to these headline features, Python 3.14 comes with numerous smaller enhancements and optimizations. There’s a new &lt;code&gt;compression.zstd&lt;/code&gt; module for &lt;a href=&quot;https://en.wikipedia.org/wiki/Zstd&quot;&gt;Zstandard&lt;/a&gt; compression (&lt;a href=&quot;https://peps.python.org/pep-0784/&quot;&gt;PEP 784&lt;/a&gt;) and support for UUID versions 6-8 with faster generation for existing versions. Additionally, there are optional brackets in &lt;code&gt;except&lt;/code&gt; statements (&lt;a href=&quot;https://peps.python.org/pep-0758/&quot;&gt;PEP 758&lt;/a&gt;) and built-in HMAC implementations from the &lt;a href=&quot;https://github.com/hacl-star/hacl-star/&quot;&gt;HACL*&lt;/a&gt; project for improved security.&lt;/p&gt;
&lt;p&gt;The standard library tools like &lt;code&gt;unittest&lt;/code&gt;, &lt;code&gt;argparse&lt;/code&gt;, &lt;code&gt;json&lt;/code&gt;, and &lt;code&gt;calendar&lt;/code&gt; now produce colored output on the terminal, and the new zero-overhead debugger interface (&lt;a href=&quot;https://peps.python.org/pep-0768/&quot;&gt;PEP 768&lt;/a&gt;) lays the groundwork for more powerful &lt;a href=&quot;/ref/glossary/debugging/&quot; class=&quot;ref-link&quot;&gt;debugging&lt;/a&gt; tools. Official installers for Python 3.14 even include an experimental JIT compiler enabled by default, hinting at performance boosts on the horizon.&lt;/p&gt;
&lt;p&gt;With so much new in &lt;a href=&quot;https://realpython.com/python314-new-features/&quot;&gt;Python 3.14&lt;/a&gt;, now is a great time to experiment with it. Many of these features, like t-strings and annotation changes, are fully available by default, while others, such as the no-GIL build or JIT, may require special opt-in. You can read more in the official &lt;a href=&quot;https://docs.python.org/3/whatsnew/3.14.html&quot;&gt;What’s new in Python 3.14&lt;/a&gt; document for a comprehensive overview.&lt;/p&gt;
&lt;p&gt;As always, be sure to check that your critical third-party libraries support Python 3.14 before upgrading in production, but initial support is strong with many popular projects already shipping &lt;a href=&quot;/ref/glossary/wheel/&quot; class=&quot;ref-link&quot;&gt;wheels&lt;/a&gt; for 3.14. Congratulations to the core developers and community on this significant release!&lt;/p&gt;
&lt;h3 id=&quot;python-315-alpha-1-released&quot;&gt;Python 3.15 Alpha 1 Released&lt;a class=&quot;headerlink&quot; href=&quot;#python-315-alpha-1-released&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Even as Python 3.14 takes center stage, the core development team has promptly turned the page to Python 3.15. In mid-October, &lt;a href=&quot;https://www.python.org/downloads/release/python-3150a1/&quot;&gt;Python 3.15.0a1&lt;/a&gt; was released as the first &lt;a href=&quot;https://en.wikipedia.org/wiki/Software_release_life_cycle#Alpha&quot;&gt;alpha&lt;/a&gt; of the next version. This overlap is part of Python’s now-annual cadence—while one version is finalized, planning and development for the next are already in motion.&lt;/p&gt;
&lt;p&gt;Python 3.15 is scheduled for final release in October 2026. The alpha period, which will run through April 2026, is when new features land. As of alpha 1, only a few initial enhancements are present, since many features are still under development.&lt;/p&gt;
&lt;p&gt;Notably, Python 3.15.0a1 includes &lt;a href=&quot;https://peps.python.org/pep-0686/&quot;&gt;PEP 686&lt;/a&gt;, which will make &lt;a href=&quot;https://en.wikipedia.org/wiki/UTF-8&quot;&gt;UTF-8&lt;/a&gt; the default &lt;a href=&quot;https://realpython.com/python-encodings-guide/&quot;&gt;character encoding&lt;/a&gt; for open files, eliminating locale-dependent default encodings. It also has a new dedicated profiling API (&lt;a href=&quot;https://peps.python.org/pep-0799/&quot;&gt;PEP 799&lt;/a&gt;) to better support performance, and a C API for more efficient &lt;a href=&quot;/ref/glossary/bytes-like-object/&quot; class=&quot;ref-link&quot;&gt;&lt;code&gt;bytes&lt;/code&gt; object&lt;/a&gt; creation (&lt;a href=&quot;https://peps.python.org/pep-0782/&quot;&gt;PEP 782&lt;/a&gt;). Naturally, improvements to error messages continue as well.&lt;/p&gt;
&lt;p&gt;Alpha releases are intended for testing only. You wouldn’t use them in production, but they’re invaluable for library maintainers and curious users to try out emerging changes. If you maintain a &lt;a href=&quot;https://realpython.com/pypi-publish-python-package/&quot;&gt;distribution package&lt;/a&gt;, now is a good time to start ensuring compatibility with Python 3.15. And if you’re just interested in what’s coming, you can &lt;a href=&quot;https://realpython.com/python-pre-release/&quot;&gt;install a pre-release version&lt;/a&gt; alongside your stable Python.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&quot;https://peps.python.org/pep-0790/&quot;&gt;Python 3.15 Release Schedule&lt;/a&gt; lays out the roadmap with monthly alpha releases through early 2026, a feature freeze by May (&lt;a href=&quot;https://en.wikipedia.org/wiki/Software_release_life_cycle#Beta&quot;&gt;beta phase&lt;/a&gt;), and a final 3.15.0 release. This overlapping development cycle means we get to enjoy new Python features every year without missing a beat.&lt;/p&gt;
&lt;p&gt;One side benefit of testing alpha releases is that you can provide feedback or catch regressions early. So, if
you have time, give 3.15.0a1 a spin in a test environment. It’s an exciting glimpse into Python’s future, even
if most of the big changes are yet to come in subsequent alphas.&lt;/p&gt;
&lt;h3 id=&quot;python-39-reaches-end-of-life&quot;&gt;Python 3.9 Reaches End of Life&lt;a class=&quot;headerlink&quot; href=&quot;#python-39-reaches-end-of-life&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Exactly five years after its initial release, &lt;a href=&quot;https://realpython.com/python39-new-features/&quot;&gt;Python 3.9&lt;/a&gt; has officially reached its end of life (EOL) as of October 2025. This means that Python 3.9 will no longer receive security fixes or bug patches going forward. If you’re still using Python 3.9 in any projects, then now is the time to plan an upgrade to a later version—&lt;a href=&quot;https://realpython.com/python310-new-features/&quot;&gt;Python 3.10&lt;/a&gt; or later—because continuing to run an EOL Python version poses security risks.&lt;/p&gt;
&lt;p&gt;The end of life comes as no surprise. &lt;a href=&quot;https://peps.python.org/pep-0596/&quot;&gt;PEP 596&lt;/a&gt; set Python 3.9’s support timeline to expire in October 2025. The core developers prepared one final security release, &lt;a href=&quot;https://www.python.org/downloads/release/python-3925/&quot;&gt;Python 3.9.25&lt;/a&gt;, which was published on Halloween (October 31, 2025) as a last hurrah for the 3.9 series. In a lighthearted announcement, release manager &lt;a href=&quot;https://lukasz.langa.pl/&quot;&gt;Łukasz Langa&lt;/a&gt; quipped that:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Python 3.9 is now officially dead… since it’s Halloween 🎃 (&lt;a href=&quot;https://discuss.python.org/t/the-final-python-3-9-security-fix-release-is-out/104666&quot;&gt;Source&lt;/a&gt;)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;With that release, the &lt;code&gt;3.9&lt;/code&gt; branch in CPython’s GitHub repository is now closed, and no further updates will be made.&lt;/p&gt;
&lt;p&gt;Why does this matter? Running an unsupported Python means that any new vulnerabilities discovered in the interpreter or the &lt;a href=&quot;/ref/glossary/standard-library/&quot; class=&quot;ref-link&quot;&gt;standard library&lt;/a&gt; won’t be patched for that version. In today’s security climate, that’s a serious concern.&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python-news-november-2025/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-news-november-2025/ »&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 #273: Advice for Writing Maintainable Python Code</title>
      <id>https://realpython.com/podcasts/rpp/273/</id>
      <link href="https://realpython.com/podcasts/rpp/273/"/>
      <updated>2025-11-07T12:00:00+00:00</updated>
      <summary>What are techniques for writing maintainable Python code? How do you make your Python more readable and easier to refactor? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder&#x27;s Weekly articles and projects.</summary>
      <content type="html">
        &lt;p&gt;What are techniques for writing maintainable Python code? How do you make your Python more readable and easier to refactor? Christopher Trudeau is back on the show this week, bringing 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>Python MarkItDown: Convert Documents Into LLM-Ready Markdown</title>
      <id>https://realpython.com/python-markitdown/</id>
      <link href="https://realpython.com/python-markitdown/"/>
      <updated>2025-11-05T14:00:00+00:00</updated>
      <summary>Get started with Python MarkItDown to turn PDFs, Office files, images, and URLs into clean, LLM-ready Markdown in seconds.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;The MarkItDown library lets you quickly turn PDFs, Office files, images, HTML, audio, and URLs into LLM-ready Markdown. In this tutorial, you’ll compare MarkItDown with Pandoc, run it from the command line, use it in Python code, and integrate conversions into AI-powered workflows.&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 &lt;strong&gt;install MarkItDown&lt;/strong&gt; with &lt;code&gt;pip&lt;/code&gt; using the &lt;strong&gt;&lt;code&gt;[all]&lt;/code&gt;&lt;/strong&gt; specifier to pull in optional dependencies.&lt;/li&gt;
&lt;li&gt;The CLI’s results can be saved to a file using the &lt;strong&gt;&lt;code&gt;-o&lt;/code&gt;&lt;/strong&gt; or &lt;strong&gt;&lt;code&gt;--output&lt;/code&gt;&lt;/strong&gt; command-line option followed by a target path.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;&lt;code&gt;.convert()&lt;/code&gt;&lt;/strong&gt; method reads the input document and converts it to &lt;strong&gt;Markdown text&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;You can connect MarkItDown’s &lt;strong&gt;MCP server&lt;/strong&gt; to clients like &lt;strong&gt;Claude Desktop&lt;/strong&gt; to expose on-demand conversions to chats.&lt;/li&gt;
&lt;li&gt;MarkItDown can integrate with LLMs to generate &lt;strong&gt;image descriptions&lt;/strong&gt; and extract text from images with &lt;strong&gt;OCR&lt;/strong&gt; and &lt;strong&gt;custom prompts&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To decide whether to use MarkItDown or another library—such as Pandoc—for your Markdown conversion tasks, consider these factors:&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;Use Case&lt;/th&gt;
&lt;th class=&quot;text-center&quot;&gt;Choose MarkItDown&lt;/th&gt;
&lt;th class=&quot;text-center&quot;&gt;Choose Pandoc&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;You want fast Markdown conversion for documentation, blogs, or LLM input.&lt;/td&gt;
&lt;td class=&quot;text-center&quot;&gt;✅&lt;/td&gt;
&lt;td class=&quot;text-center&quot;&gt;—&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;You need high visual fidelity, fine-grained layout control, or broader input/output format support.&lt;/td&gt;
&lt;td class=&quot;text-center&quot;&gt;—&lt;/td&gt;
&lt;td class=&quot;text-center&quot;&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;Your choice depends on whether you value speed, structure, and AI-pipeline integration over full formatting fidelity or wide-format support. MarkItDown isn’t intended for perfect, high-fidelity conversions for human consumption. This is especially true for complex document layouts or richly formatted content, in which case you should use Pandoc.&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-markitdown-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-python-markitdown-code&quot; markdown&gt;Click here to download the free sample code&lt;/a&gt; that shows you how to use Python MarkItDown to convert documents into LLM-ready Markdown.&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.5eccc70ec931.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 MarkItDown: Convert Documents Into LLM-Ready Markdown” 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-xs-12 col-sm-4 col-md-3 align-self-center&quot;&gt;

      &lt;a href=&quot;/quizzes/python-markitdown/&quot; tabindex=&quot;-1&quot;&gt;
        &lt;div class=&quot;embed-responsive embed-responsive-16by9&quot;&gt;

            &lt;img class=&quot;card-img-top m-0 p-0 embed-responsive-item rounded&quot; style=&quot;object-fit: contain; background: #b9abe6;&quot; alt=&quot;Python MarkItDown: Convert Documents Into LLM-Ready Markdown&quot; src=&quot;https://files.realpython.com/media/MarkItDown-Convert-Anything-to-Markdown-to-Feed-to-Your-LLM_Watermarked.201792042d8c.jpg&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/MarkItDown-Convert-Anything-to-Markdown-to-Feed-to-Your-LLM_Watermarked.201792042d8c.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/MarkItDown-Convert-Anything-to-Markdown-to-Feed-to-Your-LLM_Watermarked.201792042d8c.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/MarkItDown-Convert-Anything-to-Markdown-to-Feed-to-Your-LLM_Watermarked.201792042d8c.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/MarkItDown-Convert-Anything-to-Markdown-to-Feed-to-Your-LLM_Watermarked.201792042d8c.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.5eccc70ec931.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&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-markitdown/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;Python MarkItDown: Convert Documents Into LLM-Ready Markdown&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;Practice MarkItDown basics. Convert PDFs, Word documents, Excel documents, and HTML documents to Markdown. Try the quiz.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;

&lt;h2 id=&quot;start-using-markitdown&quot;&gt;Start Using MarkItDown&lt;a class=&quot;headerlink&quot; href=&quot;#start-using-markitdown&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/microsoft/markitdown&quot;&gt;MarkItDown&lt;/a&gt; is a lightweight Python utility for converting various file formats into &lt;a href=&quot;https://daringfireball.net/projects/markdown/&quot;&gt;Markdown&lt;/a&gt; content. This tool is useful when you need to feed &lt;a href=&quot;/ref/ai-coding-glossary/llm/&quot; class=&quot;ref-link&quot;&gt;large language models (LLMs)&lt;/a&gt; and AI-powered text analysis pipelines with specific content that’s stored in other file formats. This lets you take advantage of Markdown’s high token efficiency.&lt;/p&gt;
&lt;p&gt;The library supports a wide list of input formats, including the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;PDF&lt;/li&gt;
&lt;li&gt;PowerPoint&lt;/li&gt;
&lt;li&gt;Word&lt;/li&gt;
&lt;li&gt;Excel&lt;/li&gt;
&lt;li&gt;Images&lt;/li&gt;
&lt;li&gt;HTML&lt;/li&gt;
&lt;li&gt;Text-based formats (&lt;a href=&quot;https://realpython.com/python-csv/&quot;&gt;CSV&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python-json/&quot;&gt;JSON&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python-xml-parser/&quot;&gt;XML&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The relevance of MarkItDown lies in its minimal setup and its ability to handle multiple input file formats. In the following sections, you’ll learn how to install and set up MarkItDown in your Python &lt;a href=&quot;/ref/glossary/virtual-environment/&quot; class=&quot;ref-link&quot;&gt;environment&lt;/a&gt; and explore its &lt;a href=&quot;https://realpython.com/command-line-interfaces-python-argparse/&quot;&gt;command-line interface (CLI)&lt;/a&gt; and main features.&lt;/p&gt;
&lt;h3 id=&quot;installation&quot;&gt;Installation&lt;a class=&quot;headerlink&quot; href=&quot;#installation&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;To get started with MarkItDown, you need to install the library from the &lt;a href=&quot;/ref/glossary/pypi/&quot; class=&quot;ref-link&quot;&gt;Python Package Index (PyPI)&lt;/a&gt; using &lt;a href=&quot;https://realpython.com/what-is-pip/&quot;&gt;&lt;code&gt;pip&lt;/code&gt;&lt;/a&gt;. Before running the command below, make sure you create and activate a Python &lt;a href=&quot;https://realpython.com/python-virtual-environments-a-primer/&quot;&gt;virtual environment&lt;/a&gt; to avoid cluttering your system Python installation:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; aria-label=&quot;Code block&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;mr-2 noselect&quot; aria-label=&quot;Language&quot;&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; role=&quot;button&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.5eccc70ec931.svg#regular--rectangle-terminal&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp gp-VirtualEnv&quot;&gt;(venv)&lt;/span&gt; &lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;python&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;-m&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;pip&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;install&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&#x27;markitdown[all]&#x27;&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;&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.5eccc70ec931.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;p&gt;This command installs MarkItDown and all its optional dependencies in your current Python environment. After the installation finishes, you can verify that the package is working correctly:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; aria-label=&quot;Code block&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;mr-2 noselect&quot; aria-label=&quot;Language&quot;&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; role=&quot;button&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.5eccc70ec931.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;markitdown&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;--version
&lt;span class=&quot;go&quot;&gt;markitdown 0.1.3&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot;&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.5eccc70ec931.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;p&gt;This command should display the installed version of MarkItDown, confirming a successful installation. That should be it! You’re all set up to start using the library.&lt;/p&gt;
&lt;div class=&quot;alert alert-primary&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; If you’re running the latest &lt;a href=&quot;https://realpython.com/python314-new-features/&quot;&gt;Python 3.14&lt;/a&gt; release, &lt;code&gt;pip&lt;/code&gt; might install an outdated version of MarkItDown instead of the current stable one. This happens because the library’s own dependencies haven’t been built for Python 3.14 yet, so &lt;code&gt;pip&lt;/code&gt; falls back to the earliest compatible version it finds.&lt;/p&gt;
&lt;p&gt;To fix this, you can install MarkItDown in a &lt;a href=&quot;https://realpython.com/python313-new-features/&quot;&gt;Python 3.13&lt;/a&gt; or earlier environment. Check out &lt;a href=&quot;https://realpython.com/intro-to-pyenv/&quot;&gt;pyenv&lt;/a&gt; to manage multiple versions of Python.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Alternatively, MarkItDown also supports several optional dependencies that enhance its capabilities. You can install them selectively according to your needs. Below is a list of some available optional dependencies:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;pptx&lt;/code&gt;&lt;/strong&gt; for PowerPoint files&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;docx&lt;/code&gt;&lt;/strong&gt; for Word documents&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;xlsx&lt;/code&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;code&gt;xls&lt;/code&gt;&lt;/strong&gt; for modern and older &lt;a href=&quot;https://realpython.com/openpyxl-excel-spreadsheets-python/&quot;&gt;Excel&lt;/a&gt; workbooks&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;pdf&lt;/code&gt;&lt;/strong&gt; for &lt;a href=&quot;https://realpython.com/creating-modifying-pdf/&quot;&gt;PDF&lt;/a&gt; files&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;outlook&lt;/code&gt;&lt;/strong&gt; for Outlook messages&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;az-doc-intel&lt;/code&gt;&lt;/strong&gt; for Azure Document Intelligence&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;audio-transcription&lt;/code&gt;&lt;/strong&gt; for audio transcription of &lt;a href=&quot;https://realpython.com/python-wav-files/&quot;&gt;WAV&lt;/a&gt; and MP3 files&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;youtube-transcription&lt;/code&gt;&lt;/strong&gt; for fetching YouTube video transcripts&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you only need a subset of dependencies, then you can install them with a command like the following:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; aria-label=&quot;Code block&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;mr-2 noselect&quot; aria-label=&quot;Language&quot;&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; role=&quot;button&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.5eccc70ec931.svg#regular--rectangle-terminal&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp gp-VirtualEnv&quot;&gt;(venv)&lt;/span&gt; &lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;python&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;-m&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;pip&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;install&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&#x27;markitdown[pdf,pptx,docx]&#x27;&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;&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.5eccc70ec931.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;p&gt;This command installs only the dependencies needed for processing PDF, PPTX, and DOCX files. This way, you avoid cluttering your environment with artifacts that you won’t use or need in your code.&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python-markitdown/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-markitdown/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Quiz: Python MarkItDown: Convert Documents Into LLM-Ready Markdown</title>
      <id>https://realpython.com/quizzes/python-markitdown/</id>
      <link href="https://realpython.com/quizzes/python-markitdown/"/>
      <updated>2025-11-05T12:00:00+00:00</updated>
      <summary>Practice MarkItDown basics. Convert PDFs, Word documents, Excel documents, and HTML documents to Markdown. Try the quiz.</summary>
      <content type="html">
        &lt;p&gt;In this quiz, you&amp;rsquo;ll test your understanding of the &lt;a href=&quot;https://realpython.com/python-markitdown/&quot;&gt;Python MarkItDown: Convert Documents Into LLM-Ready Markdown&lt;/a&gt; tutorial.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit how to install MarkItDown, convert documents to Markdown for your LLM workflows, and more.&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>Building UIs in the Terminal With Python Textual</title>
      <id>https://realpython.com/courses/building-uis-terminal-python-textual/</id>
      <link href="https://realpython.com/courses/building-uis-terminal-python-textual/"/>
      <updated>2025-11-04T14:00:00+00:00</updated>
      <summary>Learn to build rich, interactive terminal UIs in Python with Textual: a powerful library for modern, event-driven TUIs.</summary>
      <content type="html">
        &lt;p&gt;Have you ever wanted to create an app with an appealing interface that works in the command line? Welcome to Textual, a Python toolkit and framework for creating beautiful, functional &lt;strong&gt;text-based user interface (TUI)&lt;/strong&gt; applications. The Textual library provides a powerful and flexible framework for building TUIs. It offers a variety of features that allow you to create interactive and engaging console applications.&lt;/p&gt;
&lt;p&gt;In this video course, you&amp;rsquo;ll learn how to create, style, and enhance Textual apps with layouts, events, and actions.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;By the end of this video course, you&amp;rsquo;ll understand that:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Python Textual&lt;/strong&gt; is a framework for building terminal-based applications with interactive and visually appealing text interfaces.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Textual works&lt;/strong&gt; by providing a set of widgets, layouts, and styling options, enabling you to create responsive and interactive console apps.&lt;/li&gt;
&lt;li&gt;Textual is useful for building efficient, &lt;strong&gt;platform-independent text-based user interfaces&lt;/strong&gt; that work over remote connections and in low-resource environments.&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>Quiz: A Close Look at a FastAPI Example Application</title>
      <id>https://realpython.com/quizzes/fastapi-python-web-apis/</id>
      <link href="https://realpython.com/quizzes/fastapi-python-web-apis/"/>
      <updated>2025-11-03T12:00:00+00:00</updated>
      <summary>Practice FastAPI basics with path parameters, request bodies, async endpoints, and CORS. Build confidence to design and test simple Python web APIs.</summary>
      <content type="html">
        &lt;p&gt;In this quiz, you&amp;rsquo;ll test your understanding of the FastAPI example project that can shuffle lists, pick random items, and generate random numbers.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit how path parameters and type hints enable automatic validation, how request bodies model data, how async endpoints improve performance, and how CORS allows safe cross-origin requests.&lt;/p&gt;
&lt;p&gt;To go deeper, read &lt;a href=&quot;https://realpython.com/fastapi-python-web-apis/&quot;&gt;A Close Look at a FastAPI Example Application&lt;/a&gt;. You can also review &lt;a href=&quot;https://realpython.com/defining-your-own-python-function/&quot;&gt;Python functions&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/primer-on-python-decorators/&quot;&gt;decorators&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/crud-operations/&quot;&gt;CRUD&lt;/a&gt;, and &lt;a href=&quot;https://realpython.com/python-json/&quot;&gt;JSON&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>The Real Python Podcast – Episode #272: Michael Kennedy: Managing Your Own Python Infrastructure</title>
      <id>https://realpython.com/podcasts/rpp/272/</id>
      <link href="https://realpython.com/podcasts/rpp/272/"/>
      <updated>2025-10-31T12:00:00+00:00</updated>
      <summary>How do you deploy your Python application without getting locked into an expensive cloud-based service? This week on the show, Michael Kennedy from the Talk Python podcast returns to discuss his new book, &quot;Talk Python in Production.&quot;</summary>
      <content type="html">
        &lt;p&gt;How do you deploy your Python application without getting locked into an expensive cloud-based service? This week on the show, Michael Kennedy from the Talk Python podcast returns to discuss his new book, &quot;Talk Python in Production.&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>Speed Up Python With Concurrency</title>
      <id>https://realpython.com/courses/speed-python-concurrency/</id>
      <link href="https://realpython.com/courses/speed-python-concurrency/"/>
      <updated>2025-10-28T14:00:00+00:00</updated>
      <summary>Learn what concurrency means in Python and why you might want to use it. You&#x27;ll see a simple, non-concurrent approach and then look into why you&#x27;d want threading, asyncio, or multiprocessing.</summary>
      <content type="html">
        &lt;p&gt;Concurrency is the act of having your computer do multiple things at the same time. If you&amp;rsquo;ve heard a lot of talk about &lt;code&gt;asyncio&lt;/code&gt; &lt;a href=&quot;https://realpython.com/python37-new-features/&quot;&gt;being added to Python&lt;/a&gt; but are curious how it compares to other concurrency methods or are wondering what concurrency is and how it might speed up your program, you&amp;rsquo;ve come to the right place.&lt;/p&gt;
&lt;p&gt;In this course, you&amp;rsquo;ll learn the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;How I/O bound programs are effected by latency&lt;/li&gt;
&lt;li&gt;Which concurrent programming patterns to use&lt;/li&gt;
&lt;li&gt;What the differences are between the Python concurrency libraries&lt;/li&gt;
&lt;li&gt;How to write code that uses the &lt;code&gt;threading&lt;/code&gt;, &lt;code&gt;asyncio&lt;/code&gt;, and &lt;code&gt;multiprocessing&lt;/code&gt; libraries&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Sample code was tested using Python 3.13. Since much of the &lt;code&gt;asyncio&lt;/code&gt; library has been in flux since Python 3.4, it&amp;rsquo;s recommended to use at least Python 3.9 for the &lt;code&gt;asyncio&lt;/code&gt; portions of the course.&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: Using Python Optional Arguments When Defining Functions</title>
      <id>https://realpython.com/quizzes/python-optional-arguments/</id>
      <link href="https://realpython.com/quizzes/python-optional-arguments/"/>
      <updated>2025-10-27T12:00:00+00:00</updated>
      <summary>Practice Python function parameters, default values, *args, **kwargs, and safe optional arguments with quick questions and short code tasks.</summary>
      <content type="html">
        &lt;p&gt;You&amp;rsquo;ll revisit how Python handles parameters and arguments&amp;mdash;from default values and their order to flexible patterns like &lt;code&gt;*args&lt;/code&gt; and &lt;code&gt;**kwargs&lt;/code&gt;. You&amp;rsquo;ll also see when a simple Boolean flag can make your function calls clearer and more expressive.&lt;/p&gt;
&lt;p&gt;In this quiz, you&amp;rsquo;ll test your understanding of how mutable default argument values can lead to unexpected behavior. You&amp;rsquo;ll also practice unpacking sequences and mappings in function calls and formatting output with flags. For a deeper dive, check out the &lt;a href=&quot;https://realpython.com/python-optional-arguments/&quot;&gt;guide to optional arguments&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>The Real Python Podcast – Episode #271: Benchmarking Python 3.14 &amp; Enabling Asyncio to Scale</title>
      <id>https://realpython.com/podcasts/rpp/271/</id>
      <link href="https://realpython.com/podcasts/rpp/271/"/>
      <updated>2025-10-24T12:00:00+00:00</updated>
      <summary>How does Python 3.14 perform under a few hand-crafted benchmarks? Does the performance of asyncio scale on the free-threaded build? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder&#x27;s Weekly articles and projects.</summary>
      <content type="html">
        &lt;p&gt;How does Python 3.14 perform under a few hand-crafted benchmarks? Does the performance of asyncio scale on the free-threaded build? Christopher Trudeau is back on the show this week, bringing 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: What Can I Do With Python?</title>
      <id>https://realpython.com/quizzes/what-can-i-do-with-python/</id>
      <link href="https://realpython.com/quizzes/what-can-i-do-with-python/"/>
      <updated>2025-10-22T12:00:00+00:00</updated>
      <summary>Test your knowledge of what Python can and can&#x27;t do, from web and GUI apps to data science, CLI tools, and embedded systems.</summary>
      <content type="html">
        &lt;p&gt;How well do you know the different areas where Python shines? In this quiz, you&amp;rsquo;ll revisit web apps and APIs, GUI apps, CLI tools, machine learning, and more.&lt;/p&gt;
&lt;p&gt;You&amp;rsquo;ll also check what Python isn&amp;rsquo;t suited for and which alternatives work better. Get ready to explore the wide scope of &lt;a href=&quot;https://realpython.com/what-can-i-do-with-python/&quot;&gt;what you can do with Python&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>Investigating Quasar Data With Polars and Interactive marimo Notebooks</title>
      <id>https://realpython.com/courses/investigating-quasar-data-polars-marimo-notebooks/</id>
      <link href="https://realpython.com/courses/investigating-quasar-data-polars-marimo-notebooks/"/>
      <updated>2025-10-21T14:00:00+00:00</updated>
      <summary>Learn to visualize quasar redshift data by building an interactive marimo dashboard using Polars, pandas, and Matplotlib.</summary>
      <content type="html">
        &lt;p&gt;Learn to visualize quasar redshift data by building an interactive marimo dashboard using Polars, pandas, and Matplotlib. You&amp;rsquo;ll practice retrieving, cleaning, and displaying data in your notebook. You&amp;rsquo;ll also build interactive UI components that live-update visualizations in the notebook.&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 #270: Evolving Teaching Python in the Classroom</title>
      <id>https://realpython.com/podcasts/rpp/270/</id>
      <link href="https://realpython.com/podcasts/rpp/270/"/>
      <updated>2025-10-17T12:00:00+00:00</updated>
      <summary>How is teaching young students Python changing with the advent of LLMs? This week on the show, Kelly Schuster-Paredes from the Teaching Python podcast joins us to discuss coding and AI in the classroom.</summary>
      <content type="html">
        &lt;p&gt;How is teaching young students Python changing with the advent of LLMs? This week on the show, Kelly Schuster-Paredes from the Teaching Python podcast joins us to discuss coding and AI in the classroom.&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: Polars vs pandas: What&#x27;s the Difference?</title>
      <id>https://realpython.com/quizzes/polars-vs-pandas/</id>
      <link href="https://realpython.com/quizzes/polars-vs-pandas/"/>
      <updated>2025-10-15T12:00:00+00:00</updated>
      <summary>Take this quiz to test your knowledge of the Polars vs pandas tutorial and review the key differences between these open-source Python libraries.</summary>
      <content type="html">
        &lt;p&gt;In this quiz, you&amp;rsquo;ll test your understanding of the &lt;a href=&quot;https://realpython.com/polars-vs-pandas/&quot;&gt;Polars vs pandas: What&amp;rsquo;s the Difference?&lt;/a&gt; tutorial. Most of the answers are somewhere in the tutorial, but you may need to use some of the links to clarify some of the questions.&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 Descriptors</title>
      <id>https://realpython.com/courses/python-descriptors/</id>
      <link href="https://realpython.com/courses/python-descriptors/"/>
      <updated>2025-10-14T14:00:00+00:00</updated>
      <summary>Learn what Python descriptors are, how the descriptor protocol works, and when descriptors are useful—with practical, hands-on examples.</summary>
      <content type="html">
        &lt;p&gt;&lt;strong&gt;Descriptors&lt;/strong&gt; are a specific Python feature that power a lot of the magic hidden under the language&amp;rsquo;s hood. If you&amp;rsquo;ve ever thought that Python descriptors are an advanced topic with few practical applications, then this video course is the perfect tool to help you understand this powerful feature. You&amp;rsquo;ll come to understand why Python descriptors are such an interesting topic and discover the kinds of use cases where you can apply them.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;By the end of this video course, you&amp;rsquo;ll know:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;What &lt;strong&gt;Python descriptors&lt;/strong&gt; are&lt;/li&gt;
&lt;li&gt;Where they&amp;rsquo;re used in Python&amp;rsquo;s &lt;strong&gt;internals&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;How to &lt;strong&gt;implement&lt;/strong&gt; your own descriptors&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;When to use&lt;/strong&gt; Python descriptors&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>Quiz: How to Use Python: Your First Steps</title>
      <id>https://realpython.com/quizzes/python-first-steps/</id>
      <link href="https://realpython.com/quizzes/python-first-steps/"/>
      <updated>2025-10-13T12:00:00+00:00</updated>
      <summary>Review the basics of Python with this quiz. Practice syntax, keywords, variables, errors, and tools every beginner should know.</summary>
      <content type="html">
        &lt;p&gt;Ready to check your foundation in Python? This quiz reviews core beginner topics like variables, keywords, strings, and errors. You&amp;rsquo;ll also practice commands and tools that help you get started quickly.&lt;/p&gt;
&lt;p&gt;As you work through the questions, focus on recognizing patterns and understanding why an answer is correct. For a guided introduction, see &lt;a href=&quot;https://realpython.com/python-first-steps/&quot;&gt;How to Use Python: Your First Steps&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>The Real Python Podcast – Episode #269: Python 3.14: Exploring the New Features</title>
      <id>https://realpython.com/podcasts/rpp/269/</id>
      <link href="https://realpython.com/podcasts/rpp/269/"/>
      <updated>2025-10-10T12:00:00+00:00</updated>
      <summary>Python 3.14 is here! Christopher Trudeau returns to discuss the new version with Real Python team member Bartosz Zaczyński. This year, Bartosz coordinated the series of preview articles with members of the Real Python team and wrote the showcase tutorial, &quot;Python 3.14: Cool New Features for You to Try.&quot; Christopher&#x27;s video course, &quot;What&#x27;s New in Python 3.14&quot;, covers the topics from the article and shows the new features in action.</summary>
      <content type="html">
        &lt;p&gt;Python 3.14 is here! Christopher Trudeau returns to discuss the new version with Real Python team member Bartosz Zaczyński. This year, Bartosz coordinated the series of preview articles with members of the Real Python team and wrote the showcase tutorial, &quot;Python 3.14: Cool New Features for You to Try.&quot; Christopher&#x27;s video course, &quot;What&#x27;s New in Python 3.14&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>What&#x27;s New in Python 3.14</title>
      <id>https://realpython.com/courses/whats-new-python-314/</id>
      <link href="https://realpython.com/courses/whats-new-python-314/"/>
      <updated>2025-10-07T14:00:00+00:00</updated>
      <summary>Covers Python 3.14&#x27;s key changes: free-threading, subinterpreters, t-strings, lazy annotations, new REPL features, and improved error messages.</summary>
      <content type="html">
        &lt;p&gt;Python 3.14 was published on &lt;a href=&quot;https://peps.python.org/pep-0745/&quot;&gt;October 7, 2025&lt;/a&gt;. While many of its biggest changes happen under the hood, there are practical improvements you&amp;rsquo;ll notice right away. This version sharpens the language&amp;rsquo;s tools, boosts ergonomics, and opens doors to new capabilities without forcing you to rewrite everything.&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;A smarter, more &lt;strong&gt;colorful REPL&lt;/strong&gt; experience&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Error messages&lt;/strong&gt; that guide you toward fixes&lt;/li&gt;
&lt;li&gt;Safer hooks for &lt;strong&gt;live debugging&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Template strings (&lt;strong&gt;t-strings&lt;/strong&gt;) for controlled interpolation&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Deferred annotation evaluation&lt;/strong&gt; to simplify typing&lt;/li&gt;
&lt;li&gt;New concurrency options like &lt;strong&gt;subinterpreters&lt;/strong&gt; and a &lt;strong&gt;free-threaded&lt;/strong&gt; build&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 #268: Advice on Beginning to Learn Python</title>
      <id>https://realpython.com/podcasts/rpp/268/</id>
      <link href="https://realpython.com/podcasts/rpp/268/"/>
      <updated>2025-10-03T12:00:00+00:00</updated>
      <summary>What&#x27;s changed about learning Python over the last few years? What new techniques and updated advice should beginners have as they start their journey? This week on the show, Stephen Gruppetta and Martin Breuss return to discuss beginning to learn Python.</summary>
      <content type="html">
        &lt;p&gt;What&#x27;s changed about learning Python over the last few years? What new techniques and updated advice should beginners have as they start their journey? This week on the show, Stephen Gruppetta and Martin Breuss return to discuss beginning to learn 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>The Real Python Podcast – Episode #267: Managing Feature Flags &amp; Comparing Python Visualization Libraries</title>
      <id>https://realpython.com/podcasts/rpp/267/</id>
      <link href="https://realpython.com/podcasts/rpp/267/"/>
      <updated>2025-09-26T12:00:00+00:00</updated>
      <summary>What&#x27;s a good way to enable or disable code paths without redeploying the software? How can you use feature flags to toggle functionality for specific users of your application? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder&#x27;s Weekly articles and projects.</summary>
      <content type="html">
        &lt;p&gt;What&#x27;s a good way to enable or disable code paths without redeploying the software? How can you use feature flags to toggle functionality for specific users of your application? Christopher Trudeau is back on the show this week, bringing 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>
  

</feed>
