<?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-05-30T12:00:00+00:00</updated>
  <id>https://realpython.com/</id>
  <author>
    <name>Real Python</name>
  </author>

  
    <entry>
      <title>The Real Python Podcast – Episode #251: Python Thread Safety &amp; Managing Projects With uv</title>
      <id>https://realpython.com/podcasts/rpp/251/</id>
      <link href="https://realpython.com/podcasts/rpp/251/"/>
      <updated>2025-05-30T12:00:00+00:00</updated>
      <summary>What are the ways you can manage multithreaded code in Python? What synchronization techniques are available within Python&#x27;s threading module? 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 ways you can manage multithreaded code in Python? What synchronization techniques are available within Python&#x27;s threading module? 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>Control Flow Structures in Python</title>
      <id>https://realpython.com/python-control-flow/</id>
      <link href="https://realpython.com/python-control-flow/"/>
      <updated>2025-05-28T14:00:00+00:00</updated>
      <summary>Take control of your code with Python control flow structures. You&#x27;ll learn with real examples using loops, conditionals, try-except blocks, and pattern matching.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Python’s control flow structures allow you to dictate the order in which statements execute in your program. You can do this by using structures like conditionals, loops, and others.&lt;/p&gt;
&lt;p&gt;Normally, your code executes sequentially. You can modify this behavior using control flow structures that let you make decisions, run specific pieces of code in response to certain conditions, repeat a code block several times, and more.&lt;/p&gt;
&lt;p&gt;Knowing about control flow structures is a fundamental skill for you as a Python developer because they’ll allow you to fine-tune how your programs behave.&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;Control flow&lt;/strong&gt; in Python refers to the order in which code statements are executed or evaluated.&lt;/li&gt;
&lt;li&gt;Common &lt;strong&gt;control flow statements&lt;/strong&gt; in Python include conditionals with the &lt;code&gt;if&lt;/code&gt;, &lt;code&gt;elif&lt;/code&gt;, &lt;code&gt;else&lt;/code&gt; keywords, loops with &lt;code&gt;for&lt;/code&gt; and &lt;code&gt;while&lt;/code&gt;, exception handling with &lt;code&gt;try&lt;/code&gt; … &lt;code&gt;except&lt;/code&gt;, and structural pattern matching with &lt;code&gt;match&lt;/code&gt; … &lt;code&gt;case&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Control flow structures in Python let you &lt;strong&gt;make decisions&lt;/strong&gt;, &lt;strong&gt;repeat tasks&lt;/strong&gt;, and &lt;strong&gt;handle exceptions&lt;/strong&gt;, enhancing the dynamism and robustness of your code.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To dive deeper into Python’s control flow, explore how these constructs allow you to write more dynamic and flexible programs by making decisions and handling repetitive tasks efficiently.&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown=&quot;1&quot;&gt;Get Your Code:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/python-control-flow-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-python-control-flow-code&quot; data-focus=&quot;false&quot; markdown=&quot;1&quot;&gt;Click here to download the free sample code&lt;/a&gt; that shows you how to use control flow structures in Python.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;container border rounded text-wrap-pretty my-3&quot;&gt;

  &lt;p class=&quot;my-3&quot;&gt;&lt;mark class=&quot;marker-highlight&quot;&gt;&lt;strong&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.6eec2e95bede.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 “Control Flow Structures in Python” quiz. You’ll receive a score upon completion to help you track your learning progress:&lt;/p&gt;

  &lt;hr&gt;

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

      &lt;a href=&quot;/quizzes/python-control-flow/&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;Control Flow Structures in Python&quot; src=&quot;https://files.realpython.com/media/Control-Flow-Structures-in-Python_Watermarked-2.333650ffaf49.jpg&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/Control-Flow-Structures-in-Python_Watermarked-2.333650ffaf49.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/Control-Flow-Structures-in-Python_Watermarked-2.333650ffaf49.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/Control-Flow-Structures-in-Python_Watermarked-2.333650ffaf49.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/Control-Flow-Structures-in-Python_Watermarked-2.333650ffaf49.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.6eec2e95bede.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-control-flow/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;Control Flow Structures in Python&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;In this quiz, you&#x27;ll test your understanding of Python control flow structures, which include conditionals, loops, exception handling, and structural pattern matching. Strengthening these skills will help you write more dynamic, smart, and robust Python code.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;

&lt;h2 id=&quot;getting-to-know-control-flow-in-python&quot;&gt;Getting to Know Control Flow in Python&lt;a class=&quot;headerlink&quot; href=&quot;#getting-to-know-control-flow-in-python&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Most programming languages, including Python, execute code &lt;em&gt;sequentially&lt;/em&gt; from the top of the source file to the bottom, line by line. This way of running code is entirely logical. It’s like following a series of steps in order. However, what if you’re solving a problem with two or more action paths that depend on the result of evaluating a given condition?&lt;/p&gt;
&lt;p&gt;For example, say that you’re building an online store and need to implement a feature that decides whether a customer is eligible for free shipping. You’ve decided that if the order is greater than $150.00, then the customer gets free shipping. In this situation, you have two action paths:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;If the order is less than $150.00, then the customer doesn’t get free shipping.&lt;/li&gt;
&lt;li&gt;If the order is equal to or greater than $150.00, then the customer gets free shipping.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Now, think of a way you could do this with sequential statements. It isn’t an easy task, right? You’d need something that allows you to check the order and decide what course of action to take. That’s exactly what a conditional statement lets you do:&lt;/p&gt;
&lt;div class=&quot;codeblock mb-3 w-100&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 d-flex justify-content-between 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.6eec2e95bede.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 style=&quot;position: relative;&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;order_total&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;215.00&lt;/span&gt;

&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;order_total&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;150&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;nb&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;You got free shipping!&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;... &lt;/span&gt;&lt;span class=&quot;k&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;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;The shipping fee is $5.00&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;...&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;You got free shipping!&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.6eec2e95bede.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    &lt;template class=&quot;codeblock__copied-template&quot;&gt;
      &lt;span class=&quot;small&quot;&gt;&lt;span class=&quot;icon baseline mr-1 text-success&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.6eec2e95bede.svg#@check&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;Copied!&lt;/span&gt;
    &lt;/template&gt;
    
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Note how the code isn’t executed sequentially. Instead, the execution path depends on the condition’s result. Statements and syntax constructs that allow you to alter the normal execution flow as you did in the example above are known as &lt;strong&gt;control flow structures&lt;/strong&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; In programming, the ability of a program to choose between multiple paths of execution based on certain conditions is known as &lt;strong&gt;branching&lt;/strong&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;In programming, the term &lt;a href=&quot;/ref/glossary/control-flow/&quot; class=&quot;ref-link&quot;&gt;&lt;strong&gt;control flow&lt;/strong&gt;&lt;/a&gt; refers to the order in which individual &lt;a href=&quot;/ref/glossary/statement/&quot; class=&quot;ref-link&quot;&gt;statements&lt;/a&gt; are executed or evaluated within a program. As you already know, the normal flow of execution is sequential. However, you can alter this by using control flow statements, which include &lt;a href=&quot;https://realpython.com/python-conditional-statements/&quot;&gt;conditionals&lt;/a&gt;, &lt;a href=&quot;/ref/glossary/loop/&quot; class=&quot;ref-link&quot;&gt;loops&lt;/a&gt;, and several others.&lt;/p&gt;
&lt;p&gt;Here’s another example. This time, you need to repeat a task several times. You can do this by duplicating the same line of code as many times as needed:&lt;/p&gt;
&lt;div class=&quot;codeblock mb-3 w-100&quot; aria-label=&quot;Code block&quot; data-syntax-language=&quot;python&quot;&gt;
  &lt;div class=&quot;codeblock__header d-flex justify-content-between 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;greeting.py&lt;/code&gt;&lt;/span&gt;
    &lt;div class=&quot;noselect&quot;&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div style=&quot;position: relative;&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;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;Hello!&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Hello!&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Hello!&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.6eec2e95bede.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    &lt;template class=&quot;codeblock__copied-template&quot;&gt;
      &lt;span class=&quot;small&quot;&gt;&lt;span class=&quot;icon baseline mr-1 text-success&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.6eec2e95bede.svg#@check&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;Copied!&lt;/span&gt;
    &lt;/template&gt;
    
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This code works. However, repeating the same code several times is error-prone and introduces &lt;a href=&quot;https://realpython.com/python-code-quality/#maintainability&quot;&gt;maintainability&lt;/a&gt; issues. Additionally, what if you don’t know the number of repetitions beforehand? In this situation, a loop will save you:&lt;/p&gt;
&lt;div class=&quot;codeblock mb-3 w-100&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 d-flex justify-content-between 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.6eec2e95bede.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 style=&quot;position: relative;&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;_&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;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;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;Hello!&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;...&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;Hello!&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;Hello!&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;Hello!&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.6eec2e95bede.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    &lt;template class=&quot;codeblock__copied-template&quot;&gt;
      &lt;span class=&quot;small&quot;&gt;&lt;span class=&quot;icon baseline mr-1 text-success&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.6eec2e95bede.svg#@check&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;Copied!&lt;/span&gt;
    &lt;/template&gt;
    
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;In this example, you use a &lt;a href=&quot;https://realpython.com/python-for-loop/&quot;&gt;&lt;code&gt;for&lt;/code&gt; loop&lt;/a&gt; to run the code three times. This code is much more elegant, flexible, and less repetitive.&lt;/p&gt;
&lt;p&gt;Control flow statements like these let you make decisions, repeat tasks, and handle exceptions, making your code more dynamic and powerful. In short, they let you customize the control flow of your programs. In the rest of this tutorial, you’ll dive into Python’s most commonly used control flow statements.&lt;/p&gt;
&lt;h2 id=&quot;using-conditional-statements&quot;&gt;Using Conditional Statements&lt;a class=&quot;headerlink&quot; href=&quot;#using-conditional-statements&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;You took a quick peek at conditional statements in the previous section. A &lt;strong&gt;conditional statement&lt;/strong&gt; is a syntax construct that lets you execute certain code blocks only when a specific condition is true, while skipping them when the condition is false. It allows your programs to respond to different situations rather than just running sequentially.&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python-control-flow/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-control-flow/ »&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: Control Flow Structures in Python</title>
      <id>https://realpython.com/quizzes/python-control-flow/</id>
      <link href="https://realpython.com/quizzes/python-control-flow/"/>
      <updated>2025-05-28T12:00:00+00:00</updated>
      <summary>In this quiz, you&#x27;ll test your understanding of Python control flow structures, which include conditionals, loops, exception handling, and structural pattern matching. Strengthening these skills will help you write more dynamic, smart, and robust Python code.</summary>
      <content type="html">
        &lt;p&gt;In this quiz, you&amp;rsquo;ll test your understanding of control flow structures in Python. Control flow dictates the order in which your code executes, letting you make choices, repeat work, and handle exceptions to build more flexible, reliable programs. For hands-on examples and a deeper dive, check out the tutorial &lt;a href=&quot;https://realpython.com/python-control-flow/&quot;&gt;Control Flow Structures in 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>The LEGB Rule &amp; Understanding Python Scope</title>
      <id>https://realpython.com/courses/legb-rule-python-scope/</id>
      <link href="https://realpython.com/courses/legb-rule-python-scope/"/>
      <updated>2025-05-27T14:00:00+00:00</updated>
      <summary>In this step-by-step video course, you&#x27;ll learn what scopes are, how they work, and how to use them effectively to avoid name collisions in your code.</summary>
      <content type="html">
        &lt;p&gt;The concept of &lt;strong&gt;scope&lt;/strong&gt; rules how &lt;a href=&quot;https://realpython.com/python-variables/&quot;&gt;variables&lt;/a&gt; and names are looked up in your code. It determines the visibility of a variable within the code. The scope of a name or variable depends on the place in your code where you create that variable. The Python scope concept is generally presented using a rule known as the &lt;strong&gt;LEGB rule&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;The letters in the acronym LEGB stand for &lt;strong&gt;Local, Enclosing, Global, and Built-in&lt;/strong&gt; scopes. This summarizes not only the Python scope levels but also the sequence of steps that Python follows when resolving names in a program.&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 &lt;strong&gt;scopes&lt;/strong&gt; are and how they work in Python&lt;/li&gt;
&lt;li&gt;Why it&amp;rsquo;s important to know about &lt;strong&gt;Python scope&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;What the &lt;strong&gt;LEGB rule&lt;/strong&gt; is and how Python uses it to resolve names&lt;/li&gt;
&lt;li&gt;How to modify the &lt;strong&gt;standard behavior&lt;/strong&gt; of Python scope using &lt;code&gt;global&lt;/code&gt; and &lt;code&gt;nonlocal&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;What &lt;strong&gt;scope-related tools&lt;/strong&gt; Python offers and how you can use them&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>Marimo: A Reactive, Reproducible Notebook</title>
      <id>https://realpython.com/marimo-notebook/</id>
      <link href="https://realpython.com/marimo-notebook/"/>
      <updated>2025-05-26T14:00:00+00:00</updated>
      <summary>Discover how marimo notebook simplifies coding with reactive updates, UI elements, and sandboxing for safe, sharable notebooks.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;&lt;a href=&quot;https://marimo.io&quot;&gt;Marimo notebooks&lt;/a&gt; redefine the notebook experience by offering a reactive environment that addresses the limitations of traditional linear notebooks. With marimo, you can seamlessly reproduce and share content while benefiting from automatic cell updates and a correct execution order. Discover how marimo’s features make it an ideal tool for documenting research and learning activities.&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;Marimo notebooks&lt;/strong&gt; automatically update dependent cells, ensuring consistent results across your work.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Reactivity&lt;/strong&gt; allows marimo to determine the correct running order of cells using a &lt;strong&gt;directed acyclic graph (DAG)&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sandboxing&lt;/strong&gt; in marimo creates isolated environments for notebooks, preventing package conflicts and ensuring reproducibility.&lt;/li&gt;
&lt;li&gt;You can add &lt;strong&gt;interactivity&lt;/strong&gt; to marimo notebooks using &lt;strong&gt;UI elements&lt;/strong&gt; like sliders and radio buttons.&lt;/li&gt;
&lt;li&gt;Traditional &lt;strong&gt;linear notebooks&lt;/strong&gt; have inherent flaws, such as hidden state issues, that marimo addresses with its reactive design.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Before you can get started with marimo, you’ll need to install it. Fortunately, this is quick and easy to do:&lt;/p&gt;
&lt;div class=&quot;codeblock mb-3 w-100&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 d-flex justify-content-between 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.6eec2e95bede.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 style=&quot;position: relative;&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;python&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;-m&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;pip&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;install&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;marimo
&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.6eec2e95bede.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    &lt;template class=&quot;codeblock__copied-template&quot;&gt;
      &lt;span class=&quot;small&quot;&gt;&lt;span class=&quot;icon baseline mr-1 text-success&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.6eec2e95bede.svg#@check&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;Copied!&lt;/span&gt;
    &lt;/template&gt;
    
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;You use &lt;a href=&quot;https://realpython.com/what-is-pip/&quot;&gt;&lt;code&gt;pip&lt;/code&gt;&lt;/a&gt; to install the marimo library on your system. With this done, it’s time to get started, be amazed, and learn all about a different type of notebook.&lt;/p&gt;
&lt;p&gt;The best way to approach this tutorial is to use the instructions to complete the various examples and try the exercises yourself. If you want copies of the various notebook files created during the tutorial, you’ll find them in your download bundle. The &lt;code&gt;README.md&lt;/code&gt; file provides further details of what’s in your downloads.&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.6eec2e95bede.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 “Marimo: A Reactive, Reproducible Notebook” 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/marimo-notebook/&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: #fe7e73;&quot; alt=&quot;Marimo: A Reactive, Reproducible Notebook&quot; src=&quot;https://files.realpython.com/media/Showcase-Marimo-Notebook_Watermarked.91bd98028a40.jpg&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/Showcase-Marimo-Notebook_Watermarked.91bd98028a40.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/Showcase-Marimo-Notebook_Watermarked.91bd98028a40.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/Showcase-Marimo-Notebook_Watermarked.91bd98028a40.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/Showcase-Marimo-Notebook_Watermarked.91bd98028a40.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.6eec2e95bede.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/marimo-notebook/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;Marimo: A Reactive, Reproducible Notebook&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;This quiz is a great way to reinforce and build on what you&#x27;ve learned about marimo notebooks. You&#x27;ll find most of the answers in the tutorial, but you&#x27;ll need to do some additional research to find some of the answers.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;

&lt;h2 id=&quot;how-to-get-started-in-a-marimo-notebook&quot;&gt;How to Get Started in a Marimo Notebook&lt;a class=&quot;headerlink&quot; href=&quot;#how-to-get-started-in-a-marimo-notebook&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;A notebook is a file where you can write your programming code, run it, and view the output. You can add formatted text to explain how your code works, display charts to clarify results, and even allow your notebook’s users to try out different scenarios using a customized user interface. Once your notebook is complete, you can save everything in a single file and share your creation with others.&lt;/p&gt;
&lt;p&gt;In this section, you’ll learn to use marimo to create a simple notebook to perform a calculation and clearly display its results.&lt;/p&gt;
&lt;p&gt;Like many notebooks, marimo notebooks consist of cells. The primary cell types are &lt;strong&gt;code cells&lt;/strong&gt;, where you enter and run your Python code, and &lt;strong&gt;Markdown cells&lt;/strong&gt;, where you enter formatted text to augment the code and its output.&lt;/p&gt;
&lt;p&gt;In this first example, you’ll use a marimo notebook and &lt;a href=&quot;https://numpy.org/&quot;&gt;NumPy&lt;/a&gt; to solve a pair of &lt;a href=&quot;https://en.wikipedia.org/wiki/System_of_linear_equations&quot;&gt;simultaneous equations&lt;/a&gt;. To do this, you’ll first need to install the NumPy library:&lt;/p&gt;
&lt;div class=&quot;codeblock mb-3 w-100&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 d-flex justify-content-between 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.6eec2e95bede.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 style=&quot;position: relative;&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;python&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;-m&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;pip&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;install&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;numpy
&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.6eec2e95bede.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    &lt;template class=&quot;codeblock__copied-template&quot;&gt;
      &lt;span class=&quot;small&quot;&gt;&lt;span class=&quot;icon baseline mr-1 text-success&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.6eec2e95bede.svg#@check&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;Copied!&lt;/span&gt;
    &lt;/template&gt;
    
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;With &lt;a href=&quot;https://realpython.com/numpy-example/&quot;&gt;NumPy&lt;/a&gt; installed, you can now create your notebook by typing the following command into your console:&lt;/p&gt;
&lt;div class=&quot;codeblock mb-3 w-100&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 d-flex justify-content-between 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.6eec2e95bede.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 style=&quot;position: relative;&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;marimo&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;edit&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;simultaneous_equations.py
&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.6eec2e95bede.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    &lt;template class=&quot;codeblock__copied-template&quot;&gt;
      &lt;span class=&quot;small&quot;&gt;&lt;span class=&quot;icon baseline mr-1 text-success&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.6eec2e95bede.svg#@check&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;Copied!&lt;/span&gt;
    &lt;/template&gt;
    
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;When you run this command, you’ll most likely create a new notebook named &lt;code&gt;simultaneous_equations.py&lt;/code&gt; for editing. If you already have a marimo notebook with that name, you’ll open it instead. Either way, your notebook will be ready for you to use within your browser.&lt;/p&gt;
&lt;p&gt;Switch to your web browser, and you’ll see your new notebook. It’ll contain a single cell. Hover your mouse over the cell to reveal a range of icons, each with a tooltip that explains its purpose and shows the associated keyboard shortcuts:&lt;/p&gt;
&lt;figure class=&quot;js-lightbox&quot;&gt;&lt;a href=&quot;https://files.realpython.com/media/ie_marimo_controls.a1f18e3fee0e.jpg&quot; target=&quot;_blank&quot;&gt;&lt;img loading=&quot;lazy&quot; class=&quot;img-fluid mx-auto d-block w-75&quot; src=&quot;https://files.realpython.com/media/ie_marimo_controls.a1f18e3fee0e.jpg&quot; width=&quot;1189&quot; height=&quot;500&quot; srcset=&quot;/cdn-cgi/image/width=297,format=auto/https://files.realpython.com/media/ie_marimo_controls.a1f18e3fee0e.jpg 297w, /cdn-cgi/image/width=396,format=auto/https://files.realpython.com/media/ie_marimo_controls.a1f18e3fee0e.jpg 396w, /cdn-cgi/image/width=594,format=auto/https://files.realpython.com/media/ie_marimo_controls.a1f18e3fee0e.jpg 594w, /cdn-cgi/image/width=1189,format=auto/https://files.realpython.com/media/ie_marimo_controls.a1f18e3fee0e.jpg 1189w&quot; sizes=&quot;(min-width: 1200px) 690px, (min-width: 780px) calc(-5vw + 669px), (min-width: 580px) 510px, calc(100vw - 30px)&quot; alt=&quot;graphic showing a marimo notebook cell and its controls.&quot; data-asset=&quot;6223&quot;&gt;&lt;/a&gt;&lt;/figure&gt;

&lt;p&gt;Each of the main icons are described in the screenshot above. While most of these are self-explanatory, there are some points you should be aware of:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;em&gt;red trash can&lt;/em&gt; icon shown here won’t appear immediately in your notebook. This is used to delete a cell and will only appear when you add other cells. You can’t see it yet because all notebooks must have at least one cell. Deleting the last cell is impossible.&lt;/li&gt;
&lt;li&gt;The color of the &lt;em&gt;Run current cell&lt;/em&gt; icon is also significant. If this cell is white, as it is in the screenshot, it’s up to date and doesn’t need to be run. Once you start changing cells, you’ll see their &lt;em&gt;Run&lt;/em&gt; icons develop a yellow tinge. This warns you that the cell has become &lt;em&gt;stale&lt;/em&gt;, meaning you must run it to update it.&lt;/li&gt;
&lt;li&gt;Finally, notice that the numbers to the left of each cell indicate the line numbers of the code within the cell. Unlike most other notebooks, there are no numbers to indicate the running order of the cells. This is because marimo allows you to add code cells in any order. Marimo can work out the correct cell running order for itself. Even so, placing cells in an illogical order should be avoided.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When you hover your mouse over some of marimo’s icons, you’ll see their associated keyboard shortcuts. Unfortunately, they don’t work correctly in all browsers. If they don’t work for you, stick to using your mouse. Feel free to try them to find out if they work for you.&lt;/p&gt;
&lt;h3 id=&quot;adding-code-and-markdown-content&quot;&gt;Adding Code and Markdown Content&lt;a class=&quot;headerlink&quot; href=&quot;#adding-code-and-markdown-content&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;It’s time for you to gain experience creating some content in marimo. By following the walk-through, you’ll get hands-on practice with the basics.&lt;/p&gt;
&lt;p&gt;Although confusing the first time you see it, the single cell that contains &lt;code&gt;import marimo as mo&lt;/code&gt; is actually a blank cell. This code allows you to work with the &lt;a href=&quot;https://docs.marimo.io/api/&quot;&gt;marimo API&lt;/a&gt;. However, it’s not in the cell unless you type it in manually.&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/marimo-notebook/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/marimo-notebook/ »&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: Marimo: A Reactive, Reproducible Notebook</title>
      <id>https://realpython.com/quizzes/marimo-notebook/</id>
      <link href="https://realpython.com/quizzes/marimo-notebook/"/>
      <updated>2025-05-26T12:00:00+00:00</updated>
      <summary>This quiz is a great way to reinforce and build on what you&#x27;ve learned about marimo notebooks. You&#x27;ll find most of the answers in the tutorial, but you&#x27;ll need to do some additional research to find some of the answers.</summary>
      <content type="html">
        &lt;p&gt;Why not challenge yourself and see how much you know about marimo notebooks?&lt;/p&gt;
&lt;p&gt;Working your way through this quiz is a great way to reinforce and build on what you learned in the &lt;a href=&quot;https://realpython.com/marimo-notebook/&quot;&gt;Marimo: A Reactive, Reproducible Notebook&lt;/a&gt; tutorial. &lt;/p&gt;
&lt;p&gt;You could try answering the questions without reading the tutorial first, but you&amp;rsquo;d miss out on a great learning experience!&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 #250: DjangoCon Europe 2025: Live Recording From Dublin</title>
      <id>https://realpython.com/podcasts/rpp/250/</id>
      <link href="https://realpython.com/podcasts/rpp/250/"/>
      <updated>2025-05-23T12:00:00+00:00</updated>
      <summary>What goes into making video courses at Real Python? How should you build an installable Django 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 goes into making video courses at Real Python? How should you build an installable Django 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>
  
    <entry>
      <title>Nested Loops in Python</title>
      <id>https://realpython.com/nested-loops-python/</id>
      <link href="https://realpython.com/nested-loops-python/"/>
      <updated>2025-05-21T14:00:00+00:00</updated>
      <summary>Learn how to use nested loops in Python to iterate over multiple sequences and perform repeated actions efficiently in your programs.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Nested loops in Python allow you to place one loop inside another, enabling you to perform repeated actions over multiple sequences. Understanding nested loops helps you write more efficient code, manage complex data structures, and avoid common pitfalls such as poor readability and performance issues.&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;Nested loops in Python involve &lt;strong&gt;placing one loop inside another&lt;/strong&gt;, enabling iteration over multiple sequences or repeated actions.&lt;/li&gt;
&lt;li&gt;Situations where nested loops are a good idea include &lt;strong&gt;handling multidimensional data&lt;/strong&gt;, &lt;strong&gt;generating patterns&lt;/strong&gt;, and &lt;strong&gt;performing repetitive tasks&lt;/strong&gt; with multiple layers of iteration.&lt;/li&gt;
&lt;li&gt;You can break out of nested loops by using the &lt;strong&gt;&lt;code&gt;break&lt;/code&gt; statement&lt;/strong&gt;, which exits the innermost loop when a condition is met.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Disadvantages of nested loops&lt;/strong&gt; include potential performance bottlenecks, poor readability, and variable scoping issues.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This tutorial provides practical examples and optimization techniques for using nested loops effectively in your Python programs.&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown=&quot;1&quot;&gt;Get Your Code:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/nested-loops-python-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-nested-loops-python-code&quot; data-focus=&quot;false&quot; markdown=&quot;1&quot;&gt;Click here to download the free sample code&lt;/a&gt; that you’ll use to learn about nested loops in Python.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;container border rounded text-wrap-pretty my-3&quot;&gt;

  &lt;p class=&quot;my-3&quot;&gt;&lt;mark class=&quot;marker-highlight&quot;&gt;&lt;strong&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.6eec2e95bede.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 “Nested Loops in Python” quiz. You’ll receive a score upon completion to help you track your learning progress:&lt;/p&gt;

  &lt;hr&gt;

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

      &lt;a href=&quot;/quizzes/nested-loops-python/&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;Nested Loops in Python&quot; src=&quot;https://files.realpython.com/media/Nested-Loops-in-Python_Watermarked.0c20c531becf.jpg&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/Nested-Loops-in-Python_Watermarked.0c20c531becf.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/Nested-Loops-in-Python_Watermarked.0c20c531becf.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/Nested-Loops-in-Python_Watermarked.0c20c531becf.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/Nested-Loops-in-Python_Watermarked.0c20c531becf.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.6eec2e95bede.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/nested-loops-python/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;Nested Loops in Python&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;Nested loops allow you to perform repeated actions over multiple sequences, but is there more? Test your understanding of nested loops in Python!&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;

&lt;h2 id=&quot;getting-started-with-nested-loops-in-python&quot;&gt;Getting Started With Nested Loops in Python&lt;a class=&quot;headerlink&quot; href=&quot;#getting-started-with-nested-loops-in-python&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Loops are fundamental building blocks in programming, allowing you to iterate through actions efficiently. In Python, there are two primary types of loops: the &lt;code&gt;for&lt;/code&gt; loop and the &lt;code&gt;while&lt;/code&gt; loop. Both serve the same purpose —executing a block of code multiple times—but they differ in how they operate and in their use cases:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A &lt;a href=&quot;https://realpython.com/python-for-loop/&quot;&gt;&lt;code&gt;for&lt;/code&gt; loop&lt;/a&gt; iterates over a sequence, such as a &lt;a href=&quot;/ref/builtin-types/list/&quot; class=&quot;ref-link&quot;&gt;&lt;code&gt;list&lt;/code&gt;&lt;/a&gt; or a &lt;a href=&quot;/ref/builtin-types/range/&quot; class=&quot;ref-link&quot;&gt;&lt;code&gt;range&lt;/code&gt;&lt;/a&gt;, and executes a block of code for each item. They’re useful when the number of iterations is known beforehand.&lt;/li&gt;
&lt;li&gt;A &lt;a href=&quot;https://realpython.com/python-while-loop/&quot;&gt;&lt;code&gt;while&lt;/code&gt; loop&lt;/a&gt; runs as long as a specified condition remains true, making it useful when the number of iterations isn’t known in advance.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You create a nested loop by placing one loop inside another. This structure is especially helpful when working with multidimensional data, generating patterns, or handling tasks that involve several layers of repetition.&lt;/p&gt;
&lt;p&gt;In a nested loop, the first loop is called the &lt;strong&gt;outer loop&lt;/strong&gt;, and the loop inside is the &lt;strong&gt;inner loop&lt;/strong&gt;. So, for every iteration of the outer loop, the inner loop runs completely before the outer loop moves to the next iteration.&lt;/p&gt;
&lt;p&gt;Here’s the basic syntax of a nested loop:&lt;/p&gt;
&lt;div class=&quot;codeblock mb-3 w-100&quot; aria-label=&quot;Code block&quot; data-syntax-language=&quot;python_syntax&quot;&gt;
  &lt;div class=&quot;codeblock__header d-flex justify-content-between codeblock--blue&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot; aria-label=&quot;Language&quot;&gt;Python Syntax&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div style=&quot;position: relative;&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;outer_variable&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;outer_iterable&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;inner_variable&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;inner_iterable&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;body&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot;&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.6eec2e95bede.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    &lt;template class=&quot;codeblock__copied-template&quot;&gt;
      &lt;span class=&quot;small&quot;&gt;&lt;span class=&quot;icon baseline mr-1 text-success&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.6eec2e95bede.svg#@check&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;Copied!&lt;/span&gt;
    &lt;/template&gt;
    
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The &lt;code&gt;outer_iterable&lt;/code&gt; must be a &lt;a href=&quot;https://realpython.com/python-list/&quot;&gt;list&lt;/a&gt;, a &lt;a href=&quot;https://realpython.com/python-dicts/&quot;&gt;dictionary&lt;/a&gt;, or some other &lt;a href=&quot;https://realpython.com/python-sequences/&quot;&gt;sequence&lt;/a&gt; of items that you can iterate over. The same applies to the &lt;code&gt;inner_iterable&lt;/code&gt;. The &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt; inside the inner loop contains the code that runs once for each &lt;code&gt;for&lt;/code&gt; loop step in the &lt;code&gt;inner_iterable&lt;/code&gt;. Since the inner loop is nested inside the outer loop, it runs in full for each iteration of the outer loop.&lt;/p&gt;
&lt;p&gt;A good analogy for a nested loop is the hour and minute hands of a clock. The hour hand moves slowly around the clock, completing one full revolution every twelve hours. Meanwhile, the minute hand moves at a much faster rate, completing a revolution every hour. While both hands rotate at different speeds, they work together, each completing their own cycle within the same clock.&lt;/p&gt;
&lt;p&gt;Here’s how the clock logic looks in Python code:&lt;/p&gt;
&lt;div class=&quot;codeblock mb-3 w-100&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 d-flex justify-content-between 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.6eec2e95bede.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 style=&quot;position: relative;&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;hour&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;range&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;24&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;minute&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;range&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;60&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;... &lt;/span&gt;        &lt;span class=&quot;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;hour&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;02d&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;minute&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;02d&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;...&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;00:00&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;00:01&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;00:02&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;  ⋮&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;23:57&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;23:58&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;23:59&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.6eec2e95bede.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    &lt;template class=&quot;codeblock__copied-template&quot;&gt;
      &lt;span class=&quot;small&quot;&gt;&lt;span class=&quot;icon baseline mr-1 text-success&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.6eec2e95bede.svg#@check&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;Copied!&lt;/span&gt;
    &lt;/template&gt;
    
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;As you can see, every time the minute hand completes a cycle, the hour hand moves to the next hour. &lt;code&gt;:02d&lt;/code&gt; is a &lt;a href=&quot;https://realpython.com/python-formatted-output/#format-specifiers-and-their-components&quot;&gt;format specifier&lt;/a&gt; that ensures the number is printed as a two-digit-wide integer value.&lt;/p&gt;
&lt;p&gt;Now that you’ve been introduced to nested loops, it’s time to explore some practical examples. You’ll become familiar with writing programs using nested loops in the following section.&lt;/p&gt;
&lt;h2 id=&quot;exploring-practical-examples-of-nested-loops&quot;&gt;Exploring Practical Examples of Nested Loops&lt;a class=&quot;headerlink&quot; href=&quot;#exploring-practical-examples-of-nested-loops&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;As you just learned, nested loops have a number of use cases. Here, you’ll have a look at a few examples. These examples are interesting and practical, allowing you to have fun as you explore their syntax and semantics.&lt;/p&gt;
&lt;h3 id=&quot;printing-patterns-with-nested-loops&quot;&gt;Printing Patterns With Nested Loops&lt;a class=&quot;headerlink&quot; href=&quot;#printing-patterns-with-nested-loops&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Being able to print any pattern of your choosing is a fascinating feat in programming. One way you can achieve this is by understanding how nested loops work. The code snippet below builds a sail pattern using a few simple symbols. While this may not seem particularly exciting, consider it a first step toward creating something spectacular—like a spaceship:&lt;/p&gt;
&lt;div class=&quot;codeblock mb-3 w-100&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 d-flex justify-content-between 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.6eec2e95bede.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 style=&quot;position: relative;&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;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;height&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;6&lt;/span&gt;
&lt;span class=&quot;linenos&quot;&gt; 2&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;sail_patterns&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;*#-x+o&quot;&lt;/span&gt;
&lt;span class=&quot;linenos&quot;&gt; 3&lt;/span&gt;&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;row&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;range&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;height&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;gp&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;n&quot;&gt;pattern&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&quot;&lt;/span&gt;
&lt;span class=&quot;linenos&quot;&gt; 5&lt;/span&gt;&lt;span class=&quot;gp&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;n&quot;&gt;spacing&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot; &quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;height&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;row&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;gp&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;symbol&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sail_patterns&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;gp&quot;&gt;... &lt;/span&gt;        &lt;span class=&quot;n&quot;&gt;pattern&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;symbol&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;row&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;spacing&lt;/span&gt;
&lt;span class=&quot;linenos&quot;&gt; 8&lt;/span&gt;&lt;span class=&quot;gp&quot;&gt;...&lt;/span&gt;
&lt;span class=&quot;linenos&quot;&gt; 9&lt;/span&gt;&lt;span class=&quot;gp&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;nb&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pattern&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;linenos&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;gp&quot;&gt;...&lt;/span&gt;
&lt;span class=&quot;linenos&quot;&gt;11&lt;/span&gt;
&lt;span class=&quot;linenos&quot;&gt;12&lt;/span&gt;&lt;span class=&quot;go&quot;&gt;*     #     -     x     +     o&lt;/span&gt;
&lt;span class=&quot;linenos&quot;&gt;13&lt;/span&gt;&lt;span class=&quot;go&quot;&gt;**    ##    --    xx    ++    oo&lt;/span&gt;
&lt;span class=&quot;linenos&quot;&gt;14&lt;/span&gt;&lt;span class=&quot;go&quot;&gt;***   ###   ---   xxx   +++   ooo&lt;/span&gt;
&lt;span class=&quot;linenos&quot;&gt;15&lt;/span&gt;&lt;span class=&quot;go&quot;&gt;****  ####  ----  xxxx  ++++  oooo&lt;/span&gt;
&lt;span class=&quot;linenos&quot;&gt;16&lt;/span&gt;&lt;span class=&quot;go&quot;&gt;***** ##### ----- xxxxx +++++ ooooo&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.6eec2e95bede.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    &lt;template class=&quot;codeblock__copied-template&quot;&gt;
      &lt;span class=&quot;small&quot;&gt;&lt;span class=&quot;icon baseline mr-1 text-success&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.6eec2e95bede.svg#@check&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;Copied!&lt;/span&gt;
    &lt;/template&gt;
    
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Here’s what the code does line by line:&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/nested-loops-python/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/nested-loops-python/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Quiz: Nested Loops in Python</title>
      <id>https://realpython.com/quizzes/nested-loops-python/</id>
      <link href="https://realpython.com/quizzes/nested-loops-python/"/>
      <updated>2025-05-21T12:00:00+00:00</updated>
      <summary>Nested loops allow you to perform repeated actions over multiple sequences, but is there more? Test your understanding of nested loops in Python!</summary>
      <content type="html">
        &lt;p&gt;In this quiz, you&amp;rsquo;ll test your understanding of
&lt;a href=&quot;https://realpython.com/nested-loops-python/&quot;&gt;Nested Loops in Python&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Nested loops in Python involve placing one loop inside another, enabling iteration over multiple sequences or repeated actions. They&amp;rsquo;re particularly useful for handling multidimensional data, generating patterns, and performing repetitive tasks with multiple layers of iteration.&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>First Steps With LangChain</title>
      <id>https://realpython.com/courses/first-steps-langchain/</id>
      <link href="https://realpython.com/courses/first-steps-langchain/"/>
      <updated>2025-05-20T14:00:00+00:00</updated>
      <summary>Large language models (LLMs) have taken the world by storm. In this step-by-step video course, you&#x27;ll learn to use the LangChain library to build LLM-assisted applications.</summary>
      <content type="html">
        &lt;p&gt;You&amp;rsquo;ve likely interacted with large language models (LLMs), like the ones behind OpenAI&amp;rsquo;s ChatGPT, and experienced their remarkable ability to answer questions, summarize documents, write code, and much more.&lt;/p&gt;
&lt;p&gt;While LLMs are remarkable by themselves, with a little programming knowledge, you can leverage libraries like &lt;a href=&quot;https://python.langchain.com/docs/get_started/introduction&quot;&gt;LangChain&lt;/a&gt; to create your own LLM-powered applications that can do just about anything.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this video course, you&amp;rsquo;ll learn how to&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Use &lt;strong&gt;LangChain&lt;/strong&gt; to build LLM-powered applications&lt;/li&gt;
&lt;li&gt;Create reusable instructions with &lt;strong&gt;prompt templates&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Create and extend&lt;/strong&gt; LangChain chains&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Debug&lt;/strong&gt; what happens when a chain executes&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 Group Data Using Polars .group_by()</title>
      <id>https://realpython.com/polars-groupby/</id>
      <link href="https://realpython.com/polars-groupby/"/>
      <updated>2025-05-19T14:00:00+00:00</updated>
      <summary>Start using Polars .group_by() to make sense of your data. This tutorial shows you how to group, aggregate, and reveal hidden insights with hands-on examples.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;One of the most common tasks you’ll encounter when analyzing Polars data is the need to summarize it. You can use the Polars &lt;code&gt;.group_by()&lt;/code&gt; method to create groupings based on column values. A related summarization technique is aggregation, where you take a sequence of related values and condense them into a single value.&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 summarize data using &lt;strong&gt;aggregation&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;You can use &lt;code&gt;.filter()&lt;/code&gt; to view &lt;strong&gt;specific data&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Using &lt;code&gt;.group_by()&lt;/code&gt; allows you to summarize &lt;strong&gt;one or more&lt;/strong&gt; columns of your data.&lt;/li&gt;
&lt;li&gt;Your &lt;strong&gt;time series&lt;/strong&gt; data can be grouped using &lt;code&gt;.group_by_dynamic()&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;You can match summarized data with the original data using &lt;strong&gt;window functions&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Pivot tables&lt;/strong&gt; allow you to group and aggregate rows and columns of data.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In this tutorial, you’ll learn how to group data in several ways using the &lt;code&gt;.group_by()&lt;/code&gt; method in Polars and apply aggregation to each group.&lt;/p&gt;
&lt;p&gt;Before you begin, you should be familiar with the basics of working with Polars DataFrames or another DataFrame library like &lt;a href=&quot;https://realpython.com/learning-paths/pandas-data-science/&quot;&gt;pandas&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; If you’re familiar with Polars, you’ll know that in addition to DataFrames, Polars also supports &lt;a href=&quot;https://realpython.com/polars-lazyframe/&quot;&gt;LazyFrames&lt;/a&gt;. While this is an efficient tool when working with large datasets, and you’re certainly encouraged to learn how to use them, DataFrames are sufficient for the examples in this tutorial.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;In addition, you may find it helpful to use &lt;a href=&quot;https://realpython.com/jupyter-notebook-introduction/&quot;&gt;Jupyter Notebook&lt;/a&gt; as you work through many of the examples in this tutorial. Alternatively, &lt;a href=&quot;https://realpython.com/using-jupyterlab/&quot;&gt;JupyterLab&lt;/a&gt; will enhance your notebook experience, but any Python environment you’re comfortable with will work just fine.&lt;/p&gt;
&lt;p&gt;To get started, you’ll need some data. For the central part of this tutorial, you’ll use the student performance dataset freely available from the &lt;a href=&quot;https://archive.ics.uci.edu/dataset/320/student+performance&quot;&gt;UC Irvine Machine Learning Repository&lt;/a&gt;. The data in its original form comes in two files: &lt;code&gt;student-mat.csv&lt;/code&gt; and &lt;code&gt;student-por.csv&lt;/code&gt;. These contain data on students taking math and Portuguese language courses. &lt;/p&gt;
&lt;p&gt;Both files have been altered to include student identification numbers and the subject indicators &lt;code&gt;M&lt;/code&gt; and &lt;code&gt;P&lt;/code&gt;, formatted as &lt;code&gt;math.parquet&lt;/code&gt; and &lt;code&gt;portuguese.parquet&lt;/code&gt;. All data has also been merged into a single &lt;code&gt;course.parquet&lt;/code&gt; file. These three files are available in your download bundle, which you can access 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=&quot;1&quot;&gt;Get Your Code:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/polars-groupby-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-polars-groupby-code&quot; data-focus=&quot;false&quot; markdown=&quot;1&quot;&gt;Click here to download the free sample code&lt;/a&gt; that you’ll use to learn about grouping data with Polars .group_by().&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;The table below shows the fields used in this tutorial:&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;Field Name&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;absences&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Number of absences&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;age&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Student’s age&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;failures&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Number of failures&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;G1&lt;/code&gt;, &lt;code&gt;G2&lt;/code&gt;, &lt;code&gt;G3&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;First, second, and final grade&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;internet&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Student has home internet access&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;reason&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Reason for taking course&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;school&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;School attended&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;sex&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Student’s gender (&lt;code&gt;M&lt;/code&gt;, &lt;code&gt;F&lt;/code&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;student_id&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Student’s enrollment number&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;subject&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Subject studied (&lt;code&gt;M&lt;/code&gt;, &lt;code&gt;P&lt;/code&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;The dataset is quite extensive, containing over thirty fields. If you want to experiment, the &lt;code&gt;student.txt&lt;/code&gt; file defines every field. This file is also available as part of the tutorial downloads.&lt;/p&gt;
&lt;p&gt;To use Polars, you first need to install the Polars library into your Python environment. To install Polars from the command prompt, use the following command:&lt;/p&gt;
&lt;div class=&quot;codeblock mb-3 w-100&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 d-flex justify-content-between 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.6eec2e95bede.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 style=&quot;position: relative;&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;python&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;-m&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;pip&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;install&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;polars
&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.6eec2e95bede.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    &lt;template class=&quot;codeblock__copied-template&quot;&gt;
      &lt;span class=&quot;small&quot;&gt;&lt;span class=&quot;icon baseline mr-1 text-success&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.6eec2e95bede.svg#@check&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;Copied!&lt;/span&gt;
    &lt;/template&gt;
    
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;In a Jupyter Notebook, the command is &lt;code&gt;!python -m pip install polars&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;With everything set up, it’s time to start using Polars to aggregate and group data.&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown=&quot;1&quot;&gt;Get Your Code:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/polars-groupby-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-polars-groupby-code&quot; data-focus=&quot;false&quot; markdown=&quot;1&quot;&gt;Click here to download the free sample code&lt;/a&gt; that you’ll use to learn about grouping data with Polars .group_by().&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.6eec2e95bede.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 Group Data Using Polars .group_by()” 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/polars-groupby/&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: #fe7e73;&quot; alt=&quot;How to Group Data Using Polars .group_by()&quot; src=&quot;https://files.realpython.com/media/Polars-group_by-and-Aggregations_Watermarked.760a0c543c71.jpg&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/Polars-group_by-and-Aggregations_Watermarked.760a0c543c71.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/Polars-group_by-and-Aggregations_Watermarked.760a0c543c71.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/Polars-group_by-and-Aggregations_Watermarked.760a0c543c71.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/Polars-group_by-and-Aggregations_Watermarked.760a0c543c71.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.6eec2e95bede.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/polars-groupby/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;How to Group Data Using Polars .group_by()&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;Put your Polars .group_by() and aggregation skills to the test. This quiz goes beyond the tutorial, so you&#x27;ll need to dig deeper to find all the answers.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;

&lt;h2 id=&quot;aggregating-data&quot;&gt;Aggregating Data&lt;a class=&quot;headerlink&quot; href=&quot;#aggregating-data&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Whenever you want to aggregate data without grouping it, you apply an aggregation function directly to the column or columns you want to analyze. More often than not, you’ll also want to group your aggregated data. You’ll learn how to do that later—for now, you’ll focus on aggregation.&lt;/p&gt;
&lt;h3 id=&quot;learning-the-basics&quot;&gt;Learning the Basics&lt;a class=&quot;headerlink&quot; href=&quot;#learning-the-basics&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Suppose you wanted to find the highest number of absences among students in the math class. You can do this as follows:&lt;/p&gt;
&lt;div class=&quot;codeblock mb-3 w-100&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 d-flex justify-content-between 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.6eec2e95bede.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 style=&quot;position: relative;&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nn&quot;&gt;polars&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;k&quot;&gt;as&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nn&quot;&gt;pl&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;math_students&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pl&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;read_parquet&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;math.parquet&quot;&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;p&quot;&gt;(&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;n&quot;&gt;math_students&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;select&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pl&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;col&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;absences&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;())&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;... &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;shape: (1, 1)&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;┌──────────┐&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;│ absences │&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;│ ---      │&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;│ i64      │&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;╞══════════╡&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;│ 75       │&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;└──────────┘&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot;&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.6eec2e95bede.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    &lt;template class=&quot;codeblock__copied-template&quot;&gt;
      &lt;span class=&quot;small&quot;&gt;&lt;span class=&quot;icon baseline mr-1 text-success&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.6eec2e95bede.svg#@check&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;Copied!&lt;/span&gt;
    &lt;/template&gt;
    
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;After installing the Polars library earlier, you &lt;code&gt;import&lt;/code&gt; it into your code with the conventional alias &lt;code&gt;pl&lt;/code&gt; to access its functionality. This allows you to use the &lt;code&gt;read_parquet()&lt;/code&gt; function to read the contents of &lt;code&gt;math.parquet&lt;/code&gt; into a Polars DataFrame.&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/polars-groupby/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/polars-groupby/ »&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 Group Data Using Polars .group_by()</title>
      <id>https://realpython.com/quizzes/polars-groupby/</id>
      <link href="https://realpython.com/quizzes/polars-groupby/"/>
      <updated>2025-05-19T12:00:00+00:00</updated>
      <summary>Put your Polars .group_by() and aggregation skills to the test. This quiz goes beyond the tutorial, so you&#x27;ll need to dig deeper to find all the answers.</summary>
      <content type="html">
        &lt;p&gt;In this quiz, you&amp;rsquo;ll test your understanding of the techniques covered in
&lt;a href=&quot;https://realpython.com/polars-groupby/&quot;&gt;How to Group Data Using Polars .group_by()&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through the questions, you&amp;rsquo;ll review your understanding of how to use the data aggregation and grouping techniques provided by Polars.&lt;/p&gt;
&lt;p&gt;You&amp;rsquo;ll need to do some research outside of the tutorial to answer all the questions, so let this challenge take you on a learning journey.&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 #249: Going Beyond requirements.txt With pylock.toml and PEP 751</title>
      <id>https://realpython.com/podcasts/rpp/249/</id>
      <link href="https://realpython.com/podcasts/rpp/249/"/>
      <updated>2025-05-16T12:00:00+00:00</updated>
      <summary>What is the best way to record the Python dependencies for the reproducibility of your projects? What advantages will lock files provide for those projects? This week on the show, we welcome back Python Core Developer Brett Cannon to discuss his journey to bring PEP 751 and the pylock.toml file format to the community.</summary>
      <content type="html">
        &lt;p&gt;What is the best way to record the Python dependencies for the reproducibility of your projects? What advantages will lock files provide for those projects? This week on the show, we welcome back Python Core Developer Brett Cannon to discuss his journey to bring PEP 751 and the pylock.toml file format to the community.&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 Get the Most Out of PyCon US</title>
      <id>https://realpython.com/pycon-guide/</id>
      <link href="https://realpython.com/pycon-guide/"/>
      <updated>2025-05-14T14:00:00+00:00</updated>
      <summary>Have your best PyCon US yet! This guide covers what to expect, how to prepare, and offers tips for before, during, and after the conference.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Congratulations! You’re going to PyCon US!&lt;/p&gt;
&lt;p&gt;Whether this is your first time or you’re a regular attendee, going to a conference full of people who love the same thing as you is always a fun experience. There’s so much more to PyCon than just a bunch of people talking about the Python language—it’s a vibrant community event filled with talks, workshops, hallway conversations, and social gatherings. But for first-time attendees, it can also feel a little intimidating. This guide will help you navigate all there is to see and do at PyCon.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://us.pycon.org/2025/&quot;&gt;PyCon US&lt;/a&gt; is the biggest conference centered around Python. Originally launched in 2003, this conference has grown exponentially and has even spawned several other &lt;a href=&quot;https://www.python.org/community/workshops/&quot;&gt;PyCons and workshops around the world&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Everyone who attends PyCon will have a different experience, and that’s what makes the conference truly unique. This guide is meant to help you, but you don’t need to follow it strictly.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;By the end of this article, you’ll know:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;How PyCon consists of &lt;strong&gt;tutorials&lt;/strong&gt;, &lt;strong&gt;conference&lt;/strong&gt;, and &lt;strong&gt;sprints&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;What to do &lt;strong&gt;before&lt;/strong&gt; you go&lt;/li&gt;
&lt;li&gt;What to do &lt;strong&gt;during&lt;/strong&gt; PyCon&lt;/li&gt;
&lt;li&gt;What to do &lt;strong&gt;after&lt;/strong&gt; the event&lt;/li&gt;
&lt;li&gt;How to have a &lt;strong&gt;great&lt;/strong&gt; PyCon&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This guide contains links that are specific to PyCon 2025, but it should be useful for future PyCons as well.&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown=&quot;1&quot;&gt;Free Download:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/python-tricks-sample-pdf/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-python-tricks-sample-pdf&quot; data-focus=&quot;false&quot; markdown=&quot;1&quot;&gt;Get a sample chapter from Python Tricks: The Book&lt;/a&gt; that shows you Python’s best practices with simple examples you can apply instantly to write more beautiful + Pythonic code.&lt;/p&gt;
&lt;/div&gt;
&lt;h2 id=&quot;what-pycon-involves&quot;&gt;What PyCon Involves&lt;a class=&quot;headerlink&quot; href=&quot;#what-pycon-involves&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Before considering how to get the most out of PyCon, it’s first important to understand what PyCon involves.&lt;/p&gt;
&lt;p&gt;PyCon is divided into three stages:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Tutorials:&lt;/strong&gt; PyCon starts with two days of three-hour workshops, during which you learn in depth with instructors. These sessions are worth attending because the class sizes are small, and you’ll have the chance to ask instructors questions directly. You should consider going to at least one of these if you can. They have an additional cost of $150 per tutorial.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Conference:&lt;/strong&gt; Next, PyCon offers three days of talks. Each presentation runs for 30 to 45 minutes, and around five talks run concurrently, including a Spanish-language charlas track. But that’s not all: there are open spaces, sponsors, posters, lightning talks, dinners, and so much more.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Sprints:&lt;/strong&gt; During this stage, you can take what you’ve learned and apply it! This is a four-day exercise where people group up to work on various open-source projects related to Python. If you’ve got the time, going to one or more sprint days is a great way to practice what you’ve learned, become associated with an open-source project, and network with other smart and talented people. If you’re still unconvinced, here’s &lt;a href=&quot;https://pycon.blogspot.com/2025/04/pyconus-sprints.html&quot;&gt;what to expect at this year’s PyCon US sprints&lt;/a&gt;. Learn more about sprints from an earlier year in this &lt;a href=&quot;https://pycon.blogspot.com/2016/03/why-not-join-sprints-this-year-at-pycon.html&quot;&gt;blog post&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Since most PyCon attendees go to the conference part, that’ll be the focus of this article. However, don’t let that deter you from attending the tutorials or sprints if you can!&lt;/p&gt;
&lt;p&gt;You may learn more technical skills by attending the tutorials rather than listening to the talks. The sprints are great for networking and applying the skills you already have, as well as learning new ones from the people you’ll be working with.&lt;/p&gt;
&lt;h2 id=&quot;what-to-do-before-you-go&quot;&gt;What to Do Before You Go&lt;a class=&quot;headerlink&quot; href=&quot;#what-to-do-before-you-go&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;In general, the more prepared you are for something, the better your experience will be. The same applies to PyCon.&lt;/p&gt;
&lt;p&gt;It’s really helpful to plan and prepare ahead of time, which you’re already doing just by reading this article!&lt;/p&gt;
&lt;p&gt;Look through the &lt;a href=&quot;https://us.pycon.org/2025/schedule/talks/&quot;&gt;talks schedule&lt;/a&gt; and see which talks sound most interesting. This doesn’t mean you need to plan out all of the talks you’ll see in every slot possible. But it helps to get an idea of which topics will be presented so that you can decide what you’re most interested in.&lt;/p&gt;
&lt;p&gt;Getting the &lt;a href=&quot;https://us.pycon.org/2025/attend/onsite-information/&quot;&gt;PyCon US mobile app&lt;/a&gt; will help you plan your schedule. This app lets you view the schedule for the talks and add reminders for those you want to attend. If you’re having a hard time picking which talks to attend, you can come prepared with a question or problem you need to solve. Doing this can help you focus on the topics that are important to you.&lt;/p&gt;
&lt;p&gt;If you can, come a day early to check in and attend the opening reception. The line to check in on the first day is always long, so you’ll save time if you check in the day before. There’s also an opening reception that evening, where you can meet other attendees and speakers and check out the various sponsors and their booths.&lt;/p&gt;
&lt;p&gt;If you’re new to PyCon, the &lt;a href=&quot;https://us.pycon.org/2025/events/newcomer-orientation/&quot;&gt;Newcomer Orientation&lt;/a&gt; can help you learn about the conference and how you can participate.&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/pycon-guide/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/pycon-guide/ »&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>Working With Missing Data in Polars</title>
      <id>https://realpython.com/courses/missing-data-polars/</id>
      <link href="https://realpython.com/courses/missing-data-polars/"/>
      <updated>2025-05-13T14:00:00+00:00</updated>
      <summary>In this video course, you&#x27;ll learn how to deal with missing data in Polars to ensure it doesn&#x27;t interfere with your data analysis. You&#x27;ll discover how to check for missing values, update them, and remove them.</summary>
      <content type="html">
        &lt;p&gt;Efficiently handling missing data in Polars is essential for keeping your datasets clean during analysis. Polars provides powerful tools to identify, replace, and remove null values, ensuring seamless data processing.&lt;/p&gt;
&lt;p&gt;This video course covers practical techniques for managing missing data and highlights Polars&amp;rsquo; capabilities to enhance your data analysis workflow. By following along, you&amp;rsquo;ll gain hands-on experience with these techniques and learn how to ensure your datasets are accurate and reliable.&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;Polars&lt;/strong&gt; allows you to handle missing data using &lt;strong&gt;LazyFrames&lt;/strong&gt; and &lt;strong&gt;DataFrames&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;You can &lt;strong&gt;check for null values&lt;/strong&gt; in Polars using the &lt;code&gt;.null_count()&lt;/code&gt; method.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;NaN&lt;/strong&gt; represents non-numeric values while &lt;strong&gt;null&lt;/strong&gt; indicates missing data.&lt;/li&gt;
&lt;li&gt;You can &lt;strong&gt;replace NaN&lt;/strong&gt; in Polars by converting them to nulls and using &lt;code&gt;.fill_null()&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;You can &lt;strong&gt;fix missing data&lt;/strong&gt; by identifying, replacing, or removing null values.&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: Getting Started With Python IDLE</title>
      <id>https://realpython.com/quizzes/python-idle/</id>
      <link href="https://realpython.com/quizzes/python-idle/"/>
      <updated>2025-05-13T12:00:00+00:00</updated>
      <summary>In this quiz, you&#x27;ll test your understanding of Python IDLE, the default integrated development environment (IDE) that comes bundled with every Python installation. You&#x27;ll revisit how to interact with Python directly in IDLE, edit and execute Python files.</summary>
      <content type="html">
        &lt;p&gt;In this quiz, you&amp;rsquo;ll test your understanding of
&lt;a href=&quot;https://realpython.com/python-idle/&quot;&gt;Python IDLE&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Python IDLE is an IDE included with Python installations, designed for basic editing, execution, and debugging of Python code. You can also customize IDLE to make it a useful tool for writing 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>Python&#x27;s T-Strings Coming Soon and Other Python News for May 2025</title>
      <id>https://realpython.com/python-news-may-2025/</id>
      <link href="https://realpython.com/python-news-may-2025/"/>
      <updated>2025-05-12T14:00:00+00:00</updated>
      <summary>Python 3.14 final alpha adds template strings, Django gets updates, plus a look ahead at major Python conferences and ecosystem developments.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Welcome to the May 2025 edition of the Python news roundup. Last month brought confirmation that Python will have the eagerly-awaited template strings, or t-strings, included in the next release. You’ll also read about other key developments in Python’s evolution from the past month, updates from the Django world, and exciting announcements from the community around upcoming conferences.&lt;/p&gt;
&lt;p&gt;From new &lt;a href=&quot;/ref/glossary/pep/&quot; class=&quot;ref-link&quot;&gt;PEP&lt;/a&gt;s and alpha releases to major framework updates, 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&gt;Join Now:&lt;/strong&gt; &lt;a href=&quot;&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-newsletter&quot; data-focus=&quot;false&quot;&gt;Click here to join the Real Python Newsletter&lt;/a&gt; and you&#x27;ll never miss another Python tutorial, course update, or post.&lt;/p&gt;&lt;/div&gt;

&lt;h2 id=&quot;pep-750-template-strings-coming-to-python&quot;&gt;PEP 750: Template Strings Coming to Python&lt;a class=&quot;headerlink&quot; href=&quot;#pep-750-template-strings-coming-to-python&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://peps.python.org/pep-0750/&quot;&gt;PEP 750&lt;/a&gt; introduces &lt;a href=&quot;https://realpython.com/podcasts/rpp/227/&quot;&gt;template strings&lt;/a&gt;, a new standard mechanism for defining string templates as reusable, structured objects. Unlike &lt;a href=&quot;https://realpython.com/python-f-strings/&quot;&gt;f-strings&lt;/a&gt; or &lt;a href=&quot;https://realpython.com/python-string-interpolation/#creating-strings-with-the-strformat-method&quot;&gt;&lt;code&gt;str.format()&lt;/code&gt;&lt;/a&gt;, which embed formatting directly in string literals, template strings separate the definition of the string structure from the data used to populate it:&lt;/p&gt;
&lt;div class=&quot;codeblock mb-3 w-100&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 d-flex justify-content-between 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.6eec2e95bede.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 style=&quot;position: relative;&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;template&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Howdy, {input(&#x27;Enter your name: &#x27;)}!&quot;&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;Enter your name: Stephen&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;template&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;Template(&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;    strings=(&#x27;Howdy, &#x27;, &#x27;!&#x27;),&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;    interpolations=(&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;        Interpolation(&#x27;Stephen&#x27;, &quot;input(&#x27;Enter your name: &#x27;)&quot;, None, &#x27;&#x27;),&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;    )&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;item&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;template&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;nb&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;...&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;Howdy,&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;Interpolation(&#x27;Stephen&#x27;, &quot;input(&#x27;Enter your name: &#x27;)&quot;, None, &#x27;&#x27;)&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;!&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot;&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.6eec2e95bede.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    &lt;template class=&quot;codeblock__copied-template&quot;&gt;
      &lt;span class=&quot;small&quot;&gt;&lt;span class=&quot;icon baseline mr-1 text-success&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.6eec2e95bede.svg#@check&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;Copied!&lt;/span&gt;
    &lt;/template&gt;
    
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This new tool opens up new possibilities for dynamic formatting, localization, user-facing messages, and more. It also makes it easier to share and reuse format templates across an application. The addition of t-strings is already being described as a major enhancement to Python’s string-handling capabilities.&lt;/p&gt;
&lt;h2 id=&quot;other-python-language-developments&quot;&gt;Other Python Language Developments&lt;a class=&quot;headerlink&quot; href=&quot;#other-python-language-developments&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Python 3.14 continues to take shape, with a new alpha release and several PEPs being accepted or proposed. These updates give a sense of where the language is heading, especially in areas like &lt;a href=&quot;https://realpython.com/python-debugging-pdb/&quot;&gt;debugging&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/dependency-management-python-poetry/&quot;&gt;dependency management&lt;/a&gt;, and &lt;a href=&quot;https://realpython.com/python-type-checking/&quot;&gt;type checking&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&quot;python-3140a7-released&quot;&gt;Python 3.14.0a7 Released&lt;a class=&quot;headerlink&quot; href=&quot;#python-3140a7-released&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://pythoninsider.blogspot.com/2025/04/python-3140a7-3133-31210-31112-31017.html&quot;&gt;Python 3.14.0a7&lt;/a&gt; was released in April, marking the &lt;strong&gt;final alpha&lt;/strong&gt; in the Python 3.14 development cycle. This release includes several fixes and tweaks, with the focus now shifting to stabilization as the first beta approaches.&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python-news-may-2025/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-news-may-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 #248: Experiments With Gen AI, Knowledge Graphs, Workflows, and Python</title>
      <id>https://realpython.com/podcasts/rpp/248/</id>
      <link href="https://realpython.com/podcasts/rpp/248/"/>
      <updated>2025-05-09T12:00:00+00:00</updated>
      <summary>Are you looking for some projects where you can practice your Python skills? Would you like to experiment with building a generative AI app or an automated knowledge graph sentiment analysis tool? This week on the show, we speak with Raymond Camden about his journey into Python, his work in developer relations, and the Python projects featured on his blog.</summary>
      <content type="html">
        &lt;p&gt;Are you looking for some projects where you can practice your Python skills? Would you like to experiment with building a generative AI app or an automated knowledge graph sentiment analysis tool? This week on the show, we speak with Raymond Camden about his journey into Python, his work in developer relations, and the Python projects featured on his blog.&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 Loguru for Simpler Python Logging</title>
      <id>https://realpython.com/python-loguru/</id>
      <link href="https://realpython.com/python-loguru/"/>
      <updated>2025-05-07T14:00:00+00:00</updated>
      <summary>Learn how to use Loguru to implement better logging in your Python applications quickly and with less configuration. Spend more time debugging effectively with cleaner, more informative logs.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;In Python, logging is a vital programming practice that helps you track, understand, and debug your application’s behavior. Loguru is a Python library that provides simpler, more intuitive logging compared to Python’s built-in &lt;code&gt;logging&lt;/code&gt; module.&lt;/p&gt;
&lt;p&gt;Good logging gives you insights into your program’s execution, helps you diagnose issues, and provides valuable information about your application’s health in production. Without proper logging, you risk missing critical errors, spending countless hours &lt;a href=&quot;https://realpython.com/python-debugging-pdb/&quot;&gt;debugging&lt;/a&gt; blind spots, and potentially undermining your project’s overall stability.&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;Logging&lt;/strong&gt; in Python can be &lt;strong&gt;simple and intuitive&lt;/strong&gt; with the right tools.&lt;/li&gt;
&lt;li&gt;Using Loguru lets you &lt;strong&gt;start logging immediately&lt;/strong&gt; without complex configuration.&lt;/li&gt;
&lt;li&gt;You can &lt;strong&gt;customize log formats&lt;/strong&gt; and send logs to multiple destinations like files, the standard error stream, or external services.&lt;/li&gt;
&lt;li&gt;You can implement &lt;strong&gt;automatic log rotation and retention&lt;/strong&gt; policies to manage log files effectively.&lt;/li&gt;
&lt;li&gt;Loguru provides &lt;strong&gt;powerful debugging capabilities&lt;/strong&gt; that make troubleshooting easier.&lt;/li&gt;
&lt;li&gt;Loguru supports &lt;strong&gt;structured logging&lt;/strong&gt; with JSON formatting for modern applications.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;After reading this tutorial, you’ll be able to quickly implement better logging in your Python applications. You’ll spend less time wrestling with logging configuration and more time using logs effectively to debug issues. This will help you build production-ready applications that are easier to troubleshoot when problems occur.&lt;/p&gt;
&lt;p&gt;To get the most from this tutorial, you should be familiar with Python concepts like &lt;a href=&quot;https://realpython.com/defining-your-own-python-function/&quot;&gt;functions&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/primer-on-python-decorators/&quot;&gt;decorators&lt;/a&gt;, and &lt;a href=&quot;https://realpython.com/python-with-statement/&quot;&gt;context managers&lt;/a&gt;. You might also find it helpful to have some experience with Python’s built-in &lt;a href=&quot;https://realpython.com/python-logging/&quot;&gt;&lt;code&gt;logging&lt;/code&gt;&lt;/a&gt; module, though this isn’t required.&lt;/p&gt;
&lt;p&gt;Don’t worry if you’re new to logging in Python. This tutorial will guide you through everything you need to know to get started with Loguru and implement effective logging in your applications.&lt;/p&gt;
&lt;p&gt;You’ll do parts of the coding for this tutorial in the &lt;a href=&quot;https://realpython.com/python-repl/&quot;&gt;Python standard REPL&lt;/a&gt;, and some other parts with &lt;a href=&quot;https://realpython.com/run-python-scripts/&quot;&gt;Python scripts&lt;/a&gt;. You’ll find full script examples in the materials of this tutorial. You can download these scripts 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=&quot;1&quot;&gt;Get Your Code:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/python-loguru-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-python-loguru-code&quot; data-focus=&quot;false&quot; markdown=&quot;1&quot;&gt;Click here to download the free sample code&lt;/a&gt; that shows you how to use Loguru for simpler Python logging.&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.6eec2e95bede.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 Logging With the Loguru Library” quiz. You’ll receive a score upon completion to help you track your learning progress:&lt;/p&gt;

  &lt;hr&gt;

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

      &lt;a href=&quot;/quizzes/python-loguru/&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;How to Use Loguru for Simpler Python Logging&quot; src=&quot;https://files.realpython.com/media/Loguru_Watermarked.a6fd0b29bc74.jpg&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/Loguru_Watermarked.a6fd0b29bc74.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/Loguru_Watermarked.a6fd0b29bc74.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/Loguru_Watermarked.a6fd0b29bc74.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/Loguru_Watermarked.a6fd0b29bc74.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.6eec2e95bede.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-loguru/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;Python Logging With the Loguru Library&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;Think you know Python logging? Take this quick Loguru quiz to test your knowledge of formatting, sinks, rotation, and more!&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;

&lt;h2 id=&quot;installing-loguru&quot;&gt;Installing Loguru&lt;a class=&quot;headerlink&quot; href=&quot;#installing-loguru&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/delgan/loguru&quot;&gt;Loguru&lt;/a&gt; is available on &lt;a href=&quot;https://pypi.org/&quot;&gt;PyPI&lt;/a&gt;, and you can install it with &lt;a href=&quot;https://realpython.com/what-is-pip/&quot;&gt;&lt;code&gt;pip&lt;/code&gt;&lt;/a&gt;. Open a &lt;a href=&quot;https://realpython.com/terminal-commands/&quot;&gt;terminal&lt;/a&gt; or command prompt, create a new &lt;a href=&quot;https://realpython.com/python-virtual-environments-a-primer/&quot;&gt;virtual environment&lt;/a&gt;, and then install the library:&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.6eec2e95bede.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.6eec2e95bede.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.6eec2e95bede.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;div class=&quot;codeblock mb-3 w-100&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 d-flex justify-content-between 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.6eec2e95bede.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 style=&quot;position: relative;&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;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;n&quot;&gt;loguru&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.6eec2e95bede.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    &lt;template class=&quot;codeblock__copied-template&quot;&gt;
      &lt;span class=&quot;small&quot;&gt;&lt;span class=&quot;icon baseline mr-1 text-success&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.6eec2e95bede.svg#@check&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;Copied!&lt;/span&gt;
    &lt;/template&gt;
    
  &lt;/div&gt;
&lt;/div&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;div class=&quot;codeblock mb-3 w-100&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 d-flex justify-content-between 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.6eec2e95bede.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 style=&quot;position: relative;&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;loguru
&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.6eec2e95bede.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    &lt;template class=&quot;codeblock__copied-template&quot;&gt;
      &lt;span class=&quot;small&quot;&gt;&lt;span class=&quot;icon baseline mr-1 text-success&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.6eec2e95bede.svg#@check&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;Copied!&lt;/span&gt;
    &lt;/template&gt;
    
  &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This command will install the latest version of Loguru from &lt;a href=&quot;/ref/glossary/pypi/&quot; class=&quot;ref-link&quot;&gt;Python Package Index (PyPI)&lt;/a&gt; onto your machine.&lt;/p&gt;
&lt;h3 id=&quot;verifying-the-installation&quot;&gt;Verifying the Installation&lt;a class=&quot;headerlink&quot; href=&quot;#verifying-the-installation&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;To verify that the installation was successful, start a Python &lt;a href=&quot;/ref/glossary/repl/&quot; class=&quot;ref-link&quot;&gt;REPL&lt;/a&gt;:&lt;/p&gt;
&lt;div class=&quot;codeblock mb-3 w-100&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 d-flex justify-content-between 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.6eec2e95bede.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 style=&quot;position: relative;&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;/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.6eec2e95bede.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    &lt;template class=&quot;codeblock__copied-template&quot;&gt;
      &lt;span class=&quot;small&quot;&gt;&lt;span class=&quot;icon baseline mr-1 text-success&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.6eec2e95bede.svg#@check&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;Copied!&lt;/span&gt;
    &lt;/template&gt;
    
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Next, import Loguru:&lt;/p&gt;
&lt;div class=&quot;codeblock mb-3 w-100&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 d-flex justify-content-between 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.6eec2e95bede.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 style=&quot;position: relative;&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nn&quot;&gt;loguru&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.6eec2e95bede.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    &lt;template class=&quot;codeblock__copied-template&quot;&gt;
      &lt;span class=&quot;small&quot;&gt;&lt;span class=&quot;icon baseline mr-1 text-success&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.6eec2e95bede.svg#@check&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;Copied!&lt;/span&gt;
    &lt;/template&gt;
    
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;If the import runs without error, then you’ve successfully installed Loguru and can now use it to log messages in your Python programs and applications.&lt;/p&gt;
&lt;h3 id=&quot;understanding-basic-setup-considerations&quot;&gt;Understanding Basic Setup Considerations&lt;a class=&quot;headerlink&quot; href=&quot;#understanding-basic-setup-considerations&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Before diving into Loguru’s features, there are a few key points to keep in mind:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Single Logger Instance&lt;/strong&gt;: Unlike Python’s built-in &lt;code&gt;logging&lt;/code&gt; module, Loguru uses a single logger instance. You don’t need to create multiple loggers, just import the pre-configured &lt;code&gt;logger&lt;/code&gt; object:&lt;/p&gt;
&lt;div class=&quot;codeblock mb-3 w-100&quot; aria-label=&quot;Code block&quot; data-syntax-language=&quot;python&quot;&gt;
  &lt;div class=&quot;codeblock__header d-flex justify-content-between 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 style=&quot;position: relative;&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;loguru&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;logger&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.6eec2e95bede.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    &lt;template class=&quot;codeblock__copied-template&quot;&gt;
      &lt;span class=&quot;small&quot;&gt;&lt;span class=&quot;icon baseline mr-1 text-success&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.6eec2e95bede.svg#@check&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;Copied!&lt;/span&gt;
    &lt;/template&gt;
    
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Default Configuration&lt;/strong&gt;: Out of the box, Loguru logs to &lt;a href=&quot;https://en.wikipedia.org/wiki/Standard_streams#Standard_error_(stderr)&quot;&gt;stderr&lt;/a&gt; with a reasonable default format. This means you can start logging immediately without any setup.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Python Version Compatibility&lt;/strong&gt;: Loguru supports Python 3.5 and above.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Now that you understand these basic considerations, you’re ready to start logging with Loguru. In the next section, you’ll learn about basic logging operations and how to customize them to suit your needs.&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python-loguru/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-loguru/ »&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>Using the Python subprocess Module</title>
      <id>https://realpython.com/courses/python-subprocess-module/</id>
      <link href="https://realpython.com/courses/python-subprocess-module/"/>
      <updated>2025-05-06T14:00:00+00:00</updated>
      <summary>In this video course, you&#x27;ll learn how to use Python’s subprocess module to run and control external programs from your scripts. You&#x27;ll start with launching basic processes and progress to interacting with them as they execute.</summary>
      <content type="html">
        &lt;p&gt;Python&amp;rsquo;s &lt;code&gt;subprocess&lt;/code&gt; module allows you to run shell commands and manage external processes directly from your Python code. By using &lt;code&gt;subprocess&lt;/code&gt;, you can execute shell commands like &lt;code&gt;ls&lt;/code&gt; or &lt;code&gt;dir&lt;/code&gt;, launch applications, and handle both input and output streams. This module provides tools for error handling and process communication, making it a flexible choice for integrating command-line operations into your Python projects.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;By the end of this video course, you&amp;rsquo;ll understand that:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The Python &lt;code&gt;subprocess&lt;/code&gt; module is used to &lt;strong&gt;run shell commands&lt;/strong&gt; and manage external processes.&lt;/li&gt;
&lt;li&gt;You run a shell command using &lt;code&gt;subprocess&lt;/code&gt; by &lt;strong&gt;calling &lt;code&gt;subprocess.run()&lt;/code&gt;&lt;/strong&gt; with the command as a list of arguments.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;subprocess.call()&lt;/code&gt;, &lt;code&gt;subprocess.run()&lt;/code&gt;, and &lt;code&gt;subprocess.Popen()&lt;/code&gt; differ in &lt;strong&gt;how they execute commands&lt;/strong&gt; and handle process output and return codes.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;multiprocessing&lt;/code&gt; is for &lt;strong&gt;parallel execution&lt;/strong&gt; within Python, while &lt;code&gt;subprocess&lt;/code&gt; manages &lt;strong&gt;external processes&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;To execute multiple commands in sequence using &lt;code&gt;subprocess&lt;/code&gt;, you can chain them by &lt;strong&gt;using pipes or running them consecutively&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>Quiz: Python Logging With the Loguru Library</title>
      <id>https://realpython.com/quizzes/python-loguru/</id>
      <link href="https://realpython.com/quizzes/python-loguru/"/>
      <updated>2025-05-06T12:00:00+00:00</updated>
      <summary>Think you know Python logging? Take this quick Loguru quiz to test your knowledge of formatting, sinks, rotation, and more!</summary>
      <content type="html">
        &lt;p&gt;In this quiz, you&amp;rsquo;ll test your understanding of &lt;a href=&quot;https://realpython.com/python-loguru/&quot;&gt;How to Use Loguru for Simpler Python Logging&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit key concepts like installing Loguru, basic logging, formatting, sinks, log rotation, and capturing exception information.&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>Sets in Python</title>
      <id>https://realpython.com/python-sets/</id>
      <link href="https://realpython.com/python-sets/"/>
      <updated>2025-05-05T14:00:00+00:00</updated>
      <summary>Learn how to work effectively with Python sets. You’ll define set objects, explore supported operations, and understand when sets are the right choice for your code.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Python provides a built-in &lt;code&gt;set&lt;/code&gt; data type. It differs from other built-in data types in that it’s an unordered collection of unique elements. It also supports operations that differ from those of other data types. You might recall learning about sets and set theory in math class. Maybe you even remember Venn diagrams:&lt;/p&gt;
&lt;figure class=&quot;js-lightbox&quot;&gt;&lt;a href=&quot;https://files.realpython.com/media/venn-diagram.d628e9c47300.png&quot; target=&quot;_blank&quot;&gt;&lt;img loading=&quot;lazy&quot; class=&quot;img-fluid mx-auto d-block w-50&quot; src=&quot;https://files.realpython.com/media/venn-diagram.d628e9c47300.png&quot; width=&quot;415&quot; height=&quot;265&quot; srcset=&quot;/cdn-cgi/image/width=103,format=auto/https://files.realpython.com/media/venn-diagram.d628e9c47300.png 103w, /cdn-cgi/image/width=138,format=auto/https://files.realpython.com/media/venn-diagram.d628e9c47300.png 138w, /cdn-cgi/image/width=207,format=auto/https://files.realpython.com/media/venn-diagram.d628e9c47300.png 207w, /cdn-cgi/image/width=415,format=auto/https://files.realpython.com/media/venn-diagram.d628e9c47300.png 415w&quot; sizes=&quot;(min-width: 1200px) 690px, (min-width: 780px) calc(-5vw + 669px), (min-width: 580px) 510px, calc(100vw - 30px)&quot; alt=&quot;Venn Diagram&quot; data-asset=&quot;6346&quot;&gt;&lt;/a&gt;&lt;figcaption class=&quot;figure-caption text-center&quot;&gt;Venn Diagram&lt;/figcaption&gt;&lt;/figure&gt;

&lt;p&gt;In mathematics, the definition of a set can be abstract and difficult to grasp. In practice, you can think of a set as a well-defined collection of unique objects, typically called &lt;strong&gt;elements&lt;/strong&gt; or &lt;strong&gt;members&lt;/strong&gt;. Grouping objects in a set can be pretty helpful in programming. That’s why Python has sets built into the language.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;By the end of this tutorial, you’ll understand that:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A &lt;strong&gt;&lt;code&gt;set&lt;/code&gt;&lt;/strong&gt; is an unordered collection of unique, hashable elements.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;&lt;code&gt;set()&lt;/code&gt; constructor&lt;/strong&gt; works by converting any iterable into a set, removing duplicate elements in the process.&lt;/li&gt;
&lt;li&gt;You can &lt;strong&gt;initialize a &lt;code&gt;set&lt;/code&gt;&lt;/strong&gt; using literals, the &lt;code&gt;set()&lt;/code&gt; constructor, or comprehensions.&lt;/li&gt;
&lt;li&gt;Sets are &lt;strong&gt;unordered&lt;/strong&gt; because they don’t maintain a specific order of elements.&lt;/li&gt;
&lt;li&gt;Sets are useful when you need to run &lt;strong&gt;set operations&lt;/strong&gt;, &lt;strong&gt;remove duplicates&lt;/strong&gt;, run &lt;strong&gt;efficient membership tests&lt;/strong&gt;, and more.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In this tutorial, you’ll dive deep into the features of Python sets and explore topics like set creation and initialization, common set operations, set manipulation, and more.&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown=&quot;1&quot;&gt;Get Your Code:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/python-sets-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-python-sets-code&quot; data-focus=&quot;false&quot; markdown=&quot;1&quot;&gt;Click here to download the free sample code &lt;/a&gt; that shows you how to work with sets in Python.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;container border rounded text-wrap-pretty my-3&quot;&gt;

  &lt;p class=&quot;my-3&quot;&gt;&lt;mark class=&quot;marker-highlight&quot;&gt;&lt;strong&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.6eec2e95bede.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 Sets” 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-sets/&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;Sets in Python&quot; src=&quot;https://files.realpython.com/media/Sets-in-Python_Watermarked.cd8d2e9563c3.jpg&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/Sets-in-Python_Watermarked.cd8d2e9563c3.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/Sets-in-Python_Watermarked.cd8d2e9563c3.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/Sets-in-Python_Watermarked.cd8d2e9563c3.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/Sets-in-Python_Watermarked.cd8d2e9563c3.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.6eec2e95bede.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-sets/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;Python Sets&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;In this quiz, you&#x27;ll assess your understanding of Python&#x27;s built-in set data type. You&#x27;ll revisit the definition of unordered, unique, hashable collections, how to create and initialize sets, and key set operations.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;

&lt;h2 id=&quot;getting-started-with-pythons-set-data-type&quot;&gt;Getting Started With Python’s &lt;code&gt;set&lt;/code&gt; Data Type&lt;a class=&quot;headerlink&quot; href=&quot;#getting-started-with-pythons-set-data-type&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Python’s built-in &lt;code&gt;set&lt;/code&gt; data type is a &lt;a href=&quot;https://realpython.com/python-mutable-vs-immutable-types/&quot;&gt;mutable&lt;/a&gt; and unordered collection of unique and &lt;a href=&quot;/ref/glossary/hashable/&quot; class=&quot;ref-link&quot;&gt;hashable&lt;/a&gt; elements. In this definition, the qualifiers mean the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Mutable&lt;/strong&gt;: You can add or remove elements from an existing set.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Unordered&lt;/strong&gt;: A set doesn’t maintain any particular order of its elements.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Unique elements&lt;/strong&gt;: Duplicate elements aren’t allowed.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Hashable elements&lt;/strong&gt;: Each element must have a &lt;a href=&quot;/ref/builtin-functions/hash/&quot; class=&quot;ref-link&quot;&gt;hash value&lt;/a&gt; that stays the same for its entire lifetime.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;As with other mutable data types, you can modify sets by increasing or decreasing their &lt;strong&gt;size&lt;/strong&gt; or number of elements. To this end, sets provide a series of handy methods that allow you to add and remove elements to and from an existing set.&lt;/p&gt;
&lt;p&gt;The elements of a set must be unique. This feature makes sets especially useful in scenarios where you need to remove duplicate elements from an existing &lt;a href=&quot;https://realpython.com/python-iterators-iterables/&quot;&gt;iterable&lt;/a&gt;, such as a &lt;a href=&quot;https://realpython.com/python-list/&quot;&gt;list&lt;/a&gt; or &lt;a href=&quot;https://realpython.com/python-tuple/&quot;&gt;tuple&lt;/a&gt;:&lt;/p&gt;
&lt;div class=&quot;codeblock mb-3 w-100&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 d-flex justify-content-between 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.6eec2e95bede.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 style=&quot;position: relative;&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;numbers&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;5&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;nb&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;numbers&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;{1, 2, 3, 4, 5}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot;&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.6eec2e95bede.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    &lt;template class=&quot;codeblock__copied-template&quot;&gt;
      &lt;span class=&quot;small&quot;&gt;&lt;span class=&quot;icon baseline mr-1 text-success&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.6eec2e95bede.svg#@check&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;Copied!&lt;/span&gt;
    &lt;/template&gt;
    
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;In practice, removing duplicate items from an iterable might be one of the most useful and commonly used features of sets.&lt;/p&gt;
&lt;p&gt;Python implements sets as &lt;a href=&quot;https://realpython.com/python-hash-table/&quot;&gt;hash tables&lt;/a&gt;. A great feature of hash tables is that they make lookup operations almost instantaneous. Because of this, sets are exceptionally efficient in membership operations with the &lt;a href=&quot;https://realpython.com/python-in-operator/&quot;&gt;&lt;code&gt;in&lt;/code&gt; and &lt;code&gt;not in&lt;/code&gt; operators&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Finally, Python sets support common &lt;a href=&quot;https://en.wikipedia.org/wiki/Set_(abstract_data_type)#Operations&quot;&gt;set operations&lt;/a&gt;, such as &lt;a href=&quot;#union&quot;&gt;union&lt;/a&gt;, &lt;a href=&quot;#intersection&quot;&gt;intersection&lt;/a&gt;, &lt;a href=&quot;#difference&quot;&gt;difference&lt;/a&gt;, &lt;a href=&quot;#symmetric-difference&quot;&gt;symmetric difference&lt;/a&gt;, and others. This feature makes them useful when you need to do some of the following tasks:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Find common elements&lt;/strong&gt; in two or more sets&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Find differences&lt;/strong&gt; between two or more sets&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Combine multiple sets&lt;/strong&gt; together while avoiding duplicates&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;As you can see, &lt;code&gt;set&lt;/code&gt; is a powerful data type with characteristics that make it useful in many contexts and situations. Throughout the rest of this tutorial, you’ll learn more about the features that make sets a worthwhile addition to your programming toolkit.&lt;/p&gt;
&lt;h2 id=&quot;building-sets-in-python&quot;&gt;Building Sets in Python&lt;a class=&quot;headerlink&quot; href=&quot;#building-sets-in-python&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;To use a set, you first need to create it. You’ll have different ways to build sets in Python. For example, you can create them using one of the following techniques:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Set &lt;a href=&quot;/ref/glossary/literal/&quot; class=&quot;ref-link&quot;&gt;literals&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;The &lt;a href=&quot;https://docs.python.org/3/library/stdtypes.html#set&quot;&gt;&lt;code&gt;set()&lt;/code&gt;&lt;/a&gt; constructor&lt;/li&gt;
&lt;li&gt;A &lt;a href=&quot;https://realpython.com/python-set-comprehension/&quot;&gt;set comprehension&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In the following sections, you’ll learn how to use the three approaches listed above to create new sets in Python. You’ll start with set literals.&lt;/p&gt;
&lt;h3 id=&quot;creating-sets-through-literals&quot;&gt;Creating Sets Through Literals&lt;a class=&quot;headerlink&quot; href=&quot;#creating-sets-through-literals&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;You can define a new set by providing a comma-separated series of hashable objects within curly braces &lt;code&gt;{}&lt;/code&gt; as shown below:&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python-sets/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-sets/ »&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>Modern Web Automation With Python and Selenium</title>
      <id>https://realpython.com/modern-web-automation-with-python-and-selenium/</id>
      <link href="https://realpython.com/modern-web-automation-with-python-and-selenium/"/>
      <updated>2025-04-30T14:00:00+00:00</updated>
      <summary>Learn advanced Python web automation techniques with Selenium, such as headless browsing, interacting with web elements, and implementing the Page Object Model pattern.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Selenium is a web automation tool that allows you to use Python to programmatically interact with dynamic, JavaScript-generated web pages. Your Python Selenium code drives a real browser that you can instruct to fill out forms, click buttons, scrape dynamically generated data, or write automated tests for web applications.&lt;/p&gt;
&lt;p&gt;By implementing the Page Object Model (POM) design pattern, you can create clean and scalable automation scripts that are straightforward to read and maintain.&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;Selenium&lt;/strong&gt; allows you to launch browsers, visit URLs, and interact with web elements.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Headless browsers&lt;/strong&gt; let you run scripts without displaying a browser window, which is useful for automation and testing.&lt;/li&gt;
&lt;li&gt;You can target web elements using different &lt;strong&gt;locators&lt;/strong&gt;, such as CSS selectors, XPath, or IDs.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Explicit waits&lt;/strong&gt; provide a flexible way to handle dynamic content by waiting for specific conditions.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;Page Object Model&lt;/strong&gt; design pattern separates page structure from business logic.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In this tutorial, you’ll learn how to use Selenium with Python to build a fully functional music player that interacts with Bandcamp’s &lt;em&gt;Discover&lt;/em&gt; page. You’ll control the player from the command line while a headless Firefox browser runs in the background. With it, you’ll be able to play tracks, pause music, list available tracks, and load more tracks, replicating some of the website’s core functionality.&lt;/p&gt;
&lt;p&gt;Along the way, you’ll learn modern best practices, like implementing the &lt;strong&gt;Page Object Model (POM)&lt;/strong&gt;, which helps keep your automation scripts clean, testable, and maintainable. Ready to get started? Head over to &lt;a href=&quot;https://bandcamp.com/discover/&quot;&gt;bandcamp.com/discover/&lt;/a&gt; and play some of the available music to get a feel for the website and pump up your mood for this project!&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown=&quot;1&quot;&gt;Get Your Code:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/python-selenium-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-python-selenium-code&quot; data-focus=&quot;false&quot; markdown=&quot;1&quot;&gt;Click here to download the free sample code&lt;/a&gt; that shows you how to use Selenium in Python for modern web automation.&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.6eec2e95bede.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 “Web Automation With Python and Selenium” 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-selenium/&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;Modern Web Automation with Python and Selenium&quot; src=&quot;https://files.realpython.com/media/Modern-Web-Automation-With-Python-and-Selenium_Watermarked.08e8e08b976d.jpg&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/Modern-Web-Automation-With-Python-and-Selenium_Watermarked.08e8e08b976d.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/Modern-Web-Automation-With-Python-and-Selenium_Watermarked.08e8e08b976d.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/Modern-Web-Automation-With-Python-and-Selenium_Watermarked.08e8e08b976d.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/Modern-Web-Automation-With-Python-and-Selenium_Watermarked.08e8e08b976d.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.6eec2e95bede.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-selenium/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;Web Automation With Python and Selenium&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;In this quiz, you&#x27;ll test your understanding of using Selenium with Python for web automation. You&#x27;ll revisit concepts like launching browsers, interacting with web elements, handling dynamic content, and implementing the Page Object Model (POM) design pattern.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;

&lt;h2 id=&quot;understand-the-project-and-approach&quot;&gt;Understand the Project and Approach&lt;a class=&quot;headerlink&quot; href=&quot;#understand-the-project-and-approach&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Web automation&lt;/strong&gt; involves using a script to drive a browser and perform actions such as clicking links, filling out forms, and gathering data. Instead of manually navigating a website, you can delegate these tasks to Python. A typical scenario is automating repetitive tasks, such as logging in daily to a tool or scraping regularly updated data.&lt;/p&gt;
&lt;p&gt;Because many web apps are built for human interaction, they can present challenges when you try to interact with them automatically. In the early days of the internet, you could send HTTP requests and parse the resulting HTML. But modern sites often rely on &lt;a href=&quot;https://realpython.com/python-vs-javascript/&quot;&gt;JavaScript&lt;/a&gt; to handle events or generate content dynamically, meaning that an HTTP request alone probably won’t reveal the full page content. That’s where &lt;strong&gt;Selenium&lt;/strong&gt; comes in.&lt;/p&gt;
&lt;h3 id=&quot;the-selenium-project&quot;&gt;The Selenium Project&lt;a class=&quot;headerlink&quot; href=&quot;#the-selenium-project&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Selenium is a mature open-source project that provides a convenient API to control browsers. With Selenium, you can:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Launch a headless or visible browser such as Firefox or Chrome using a &lt;strong&gt;web driver&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Visit URLs and navigate pages just like a real user would.&lt;/li&gt;
&lt;li&gt;Locate elements with CSS selectors, XPath, or similar locators.&lt;/li&gt;
&lt;li&gt;Interact with elements by clicking, typing, dragging, or waiting for them to change.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Once you install the appropriate driver for your browser, you can control your browser through a script using Selenium.&lt;/p&gt;
&lt;p&gt;Selenium itself is written in &lt;a href=&quot;https://realpython.com/java-vs-python/&quot;&gt;Java&lt;/a&gt;, but has bindings for different programming languages. In Python, it’s distributed on &lt;span data-invalid-ref=&quot;glossary/PyPI&quot;&gt;PyPI&lt;/span&gt; as a single package called &lt;code&gt;selenium&lt;/code&gt;, which you can install using &lt;a href=&quot;https://realpython.com/what-is-pip/&quot;&gt;&lt;code&gt;pip&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Selenium is often used for automated testing, but it’s equally useful for generic web automation, which is what this tutorial will focus on.&lt;/p&gt;
&lt;div class=&quot;alert alert-primary&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; You might be wondering how Selenium differs from other tools for scripted web interactions, such as &lt;a href=&quot;https://realpython.com/beautiful-soup-web-scraper-python/&quot;&gt;Beautiful Soup&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/web-scraping-with-scrapy-and-mongodb/&quot;&gt;Scrapy&lt;/a&gt;, or &lt;a href=&quot;https://realpython.com/python-requests/&quot;&gt;Requests&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;One central difference is that those tools are great at handling static data, while Selenium allows you to replicate user behavior at the JavaScript level. This means that you can interact with dynamically generated web content using Selenium.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Before diving into the nuts and bolts of Selenium, it’s helpful to get a clear picture of what you’ll build by the end of this tutorial. As mentioned, you’ll create a fully functional, console-based music player that interacts with the &lt;a href=&quot;https://bandcamp.com/discover/&quot;&gt;Bandcamp &lt;em&gt;Discover&lt;/em&gt; page&lt;/a&gt; using a headless Firefox browser.&lt;/p&gt;
&lt;h3 id=&quot;your-bandcamp-discover-music-player&quot;&gt;Your Bandcamp Discover Music Player&lt;a class=&quot;headerlink&quot; href=&quot;#your-bandcamp-discover-music-player&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Bandcamp is a popular online record store and music community where you can stream songs, explore artists, and discover new albums.&lt;/p&gt;
&lt;p&gt;Selenium allows you to automate direct interactions with Bandcamp’s web interface—as though you were clicking and scrolling yourself!&lt;/p&gt;
&lt;p&gt;Your finished project will open the Bandcamp Discover page in the background, which means you won’t get to see any of the wonderful album artwork:&lt;/p&gt;
&lt;figure class=&quot;js-lightbox&quot;&gt;&lt;a href=&quot;https://files.realpython.com/media/bandcamp-discover-page.710ecc243348.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/bandcamp-discover-page.710ecc243348.png&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/bandcamp-discover-page.710ecc243348.png 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/bandcamp-discover-page.710ecc243348.png 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/bandcamp-discover-page.710ecc243348.png 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/bandcamp-discover-page.710ecc243348.png 1920w&quot; sizes=&quot;(min-width: 1200px) 690px, (min-width: 780px) calc(-5vw + 669px), (min-width: 580px) 510px, calc(100vw - 30px)&quot; alt=&quot;A view of the Bandcamp Discover page that shows album artwork, a player, and genre selection buttons on the top&quot; data-asset=&quot;6299&quot;&gt;&lt;/a&gt;&lt;/figure&gt;

&lt;p&gt;If a browser automation tool creates a browser instance without a visible browser window, it’s said to run in &lt;strong&gt;headless&lt;/strong&gt; mode. But don’t lose your head over that word—your code will stay calm and in control!&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/modern-web-automation-with-python-and-selenium/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/modern-web-automation-with-python-and-selenium/ »&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: Web Automation With Python and Selenium</title>
      <id>https://realpython.com/quizzes/python-selenium/</id>
      <link href="https://realpython.com/quizzes/python-selenium/"/>
      <updated>2025-04-30T12:00:00+00:00</updated>
      <summary>In this quiz, you&#x27;ll test your understanding of using Selenium with Python for web automation. You&#x27;ll revisit concepts like launching browsers, interacting with web elements, handling dynamic content, and implementing the Page Object Model (POM) design pattern.</summary>
      <content type="html">
        &lt;p&gt;In this quiz, you&amp;rsquo;ll test your understanding of
&lt;a href=&quot;https://realpython.com/modern-web-automation-with-python-and-selenium/&quot;&gt;Web Automation With Python and Selenium&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit concepts like launching browsers, interacting with web elements, handling dynamic content, and implementing the Page Object Model (POM) design pattern.&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>Thread Safety in Python: Locks and Other Techniques</title>
      <id>https://realpython.com/courses/thread-safety-locks-other-techniques/</id>
      <link href="https://realpython.com/courses/thread-safety-locks-other-techniques/"/>
      <updated>2025-04-29T14:00:00+00:00</updated>
      <summary>In this video course, you&#x27;ll learn about the issues that can occur when your code is run in a multithreaded environment. Then you&#x27;ll explore the various synchronization primitives available in Python&#x27;s threading module, such as locks, which help you make your code safe.</summary>
      <content type="html">
        &lt;p&gt;Threads share state in your programs, which means race conditions can be created when two or more threads fight to update a value. This course is about the various primitives you can use to ensure atomic access to your program&amp;rsquo;s shared state.&lt;/p&gt;
&lt;p&gt;By the end of this video course, you&amp;rsquo;ll be able to identify safety issues and prevent them by using the synchronization primitives in Python&amp;rsquo;s &lt;code&gt;threading&lt;/code&gt; module to make your code thread-safe.&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 &lt;strong&gt;thread safety&lt;/strong&gt; is&lt;/li&gt;
&lt;li&gt;What &lt;strong&gt;race conditions&lt;/strong&gt; are and how to avoid them&lt;/li&gt;
&lt;li&gt;How to identify &lt;strong&gt;thread safety issues&lt;/strong&gt; in your code&lt;/li&gt;
&lt;li&gt;What different &lt;strong&gt;synchronization primitives&lt;/strong&gt; exist in the &lt;code&gt;threading&lt;/code&gt; module&lt;/li&gt;
&lt;li&gt;How to use synchronization primitives to &lt;strong&gt;make your code thread-safe&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>Managing Python Projects With uv: An All-in-One Solution</title>
      <id>https://realpython.com/python-uv/</id>
      <link href="https://realpython.com/python-uv/"/>
      <updated>2025-04-28T14:00:00+00:00</updated>
      <summary>In this tutorial, you&#x27;ll learn how to create and manage your Python projects using uv, an extremely fast Python package and project manager written in Rust.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;The uv tool is a high-speed package and project manager for Python. It’s written in Rust and designed to streamline your workflow. It offers fast dependency installation and integrates various functionalities into a single tool.&lt;/p&gt;
&lt;p&gt;With uv, you can install and manage multiple Python versions, create virtual environments, efficiently handle project dependencies, reproduce working environments, and even build and publish a project. These capabilities make uv an all-in-one tool for Python project management.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;By the end of this tutorial, you’ll understand that:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;uv is a Python package and project manager&lt;/strong&gt; that integrates multiple functionalities into one tool, offering a comprehensive solution for managing Python projects.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;uv is used for fast dependency installation&lt;/strong&gt;, virtual environment management, Python version management, and project initialization, enhancing productivity and efficiency.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;uv can build and publish Python packages&lt;/strong&gt; to package repositories like PyPI, supporting a streamlined process from development to distribution.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;uv automatically handles virtual environments&lt;/strong&gt;, creating and managing them as needed to ensure clean and isolated project dependencies.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To dive deeper into managing your Python projects efficiently with uv, you should have a basic understanding of using Python virtual environments, setting up &lt;code&gt;pyproject.toml&lt;/code&gt; files for projects, and building distributable packages for a project.&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown=&quot;1&quot;&gt;Get Your Code:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/python-uv-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-python-uv-code&quot; data-focus=&quot;false&quot; markdown=&quot;1&quot;&gt;Click here to download the free sample code&lt;/a&gt; you’ll use to learn about managing Python projects with uv.&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.6eec2e95bede.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 “Managing Python Projects With uv: An All-in-One Solution” 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-uv/&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: #e5c6aa;&quot; alt=&quot;Managing Python Projects With uv: An All-in-One Solution&quot; src=&quot;https://files.realpython.com/media/Showcase-uv_Watermarked-2.4bbd6b119bc4.jpg&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/Showcase-uv_Watermarked-2.4bbd6b119bc4.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/Showcase-uv_Watermarked-2.4bbd6b119bc4.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/Showcase-uv_Watermarked-2.4bbd6b119bc4.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/Showcase-uv_Watermarked-2.4bbd6b119bc4.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.6eec2e95bede.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-uv/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;Managing Python Projects With uv: An All-in-One Solution&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;In this quiz, you&#x27;ll test your understanding of the uv tool, a high-speed package and project manager for Python.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;

&lt;h2 id=&quot;getting-to-know-uv-for-python&quot;&gt;Getting to Know uv for Python&lt;a class=&quot;headerlink&quot; href=&quot;#getting-to-know-uv-for-python&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Recently, a few exciting tools built with the &lt;a href=&quot;https://www.rust-lang.org/&quot;&gt;Rust&lt;/a&gt; programming language have appeared in the Python tooling ecosystem. &lt;a href=&quot;https://realpython.com/ruff-python/&quot;&gt;Ruff&lt;/a&gt;—a linter and code formatter for Python—is a well-known and popular example of one of these tools.&lt;/p&gt;
&lt;p&gt;In this tutorial, you’ll explore another cool tool made with Rust for Python. You’ll get to know &lt;a href=&quot;https://docs.astral.sh/uv/&quot;&gt;uv&lt;/a&gt;, an extremely fast Python &lt;strong&gt;package and project manager&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;The main idea behind these tools is to accelerate your Python workflow by speeding up your project management actions. For example, Ruff is 10 to 100 times faster than linters like &lt;a href=&quot;https://flake8.pycqa.org/en/latest/&quot;&gt;Flake8&lt;/a&gt; and code formatters like &lt;a href=&quot;https://black.readthedocs.io/en/stable/&quot;&gt;Black&lt;/a&gt;. Similarly, for package installation, uv is &lt;a href=&quot;https://github.com/astral-sh/uv/blob/main/BENCHMARKS.md&quot;&gt;10 to 100 times faster&lt;/a&gt; than &lt;a href=&quot;https://realpython.com/what-is-pip/&quot;&gt;&lt;code&gt;pip&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Additionally, uv integrates into one tool most of the functionality provided by tools like &lt;code&gt;pip&lt;/code&gt;, &lt;code&gt;pip-tools&lt;/code&gt;, &lt;a href=&quot;https://realpython.com/python-pipx/&quot;&gt;&lt;code&gt;pipx&lt;/code&gt;&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/dependency-management-python-poetry/&quot;&gt;&lt;code&gt;poetry&lt;/code&gt;&lt;/a&gt;, &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;https://twine.readthedocs.io/en/stable/&quot;&gt;&lt;code&gt;twine&lt;/code&gt;&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python-virtual-environments-a-primer/#the-virtualenv-project&quot;&gt;&lt;code&gt;virtualenv&lt;/code&gt;&lt;/a&gt;, and more. Therefore, uv is an all-in-one solution.&lt;/p&gt;
&lt;p&gt;Here’s a quick list of key uv features for managing your Python projects:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Fast dependency installation&lt;/strong&gt;: Installs dependencies really fast, which is especially useful for large dependency trees.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Virtual environment management&lt;/strong&gt;: Automatically creates and manages &lt;a href=&quot;https://realpython.com/python-virtual-environments-a-primer/&quot;&gt;virtual environments&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Python version management&lt;/strong&gt;: Allows the installation and management of multiple Python versions.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Project initialization&lt;/strong&gt;: Scaffolds a full Python project, including the root directory, &lt;a href=&quot;https://realpython.com/python-git-github-intro/&quot;&gt;Git&lt;/a&gt; repository, virtual environment, &lt;a href=&quot;https://realpython.com/python-pyproject-toml/&quot;&gt;&lt;code&gt;pyproject.toml&lt;/code&gt;&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/readme-python-project/&quot;&gt;&lt;code&gt;README&lt;/code&gt;&lt;/a&gt;, and more.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Dependency management&lt;/strong&gt;: Installs, updates, removes, and locks direct and &lt;a href=&quot;https://en.wikipedia.org/wiki/Transitive_dependency&quot;&gt;transitive dependencies&lt;/a&gt;, which allows for environment reproducibility.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Package builds and publication management&lt;/strong&gt;: Allows you to build and publish packages to package repositories like the &lt;a href=&quot;/ref/glossary/pypi/&quot; class=&quot;ref-link&quot;&gt;Python Package Index (PyPI)&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Developer tooling support&lt;/strong&gt;: Installs and lets you run development tools, such as &lt;code&gt;pytest&lt;/code&gt;, Black, and Ruff.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Apart from these features, uv is a standalone binary that allows for a smooth installation and quick upgrades. You don’t need to have Python installed on your system to install uv.&lt;/p&gt;
&lt;p&gt;So, with this quick summary of uv and its main features, you’re ready to install this tool on your system. That’s what you’ll do in the following section. Additionally, you’ll learn how to update your uv installation.&lt;/p&gt;
&lt;h2 id=&quot;installing-uv-to-manage-python-projects&quot;&gt;Installing uv to Manage Python Projects&lt;a class=&quot;headerlink&quot; href=&quot;#installing-uv-to-manage-python-projects&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The first step in using any tool is to install it on your operating system. To install uv, you have several options. The quickest one would be to use the standalone installer. Another friendly option is to install uv from &lt;a href=&quot;https://pypi.org&quot;&gt;PyPI&lt;/a&gt; using other tools like &lt;code&gt;pipx&lt;/code&gt; or &lt;a href=&quot;/ref/glossary/pip/&quot; class=&quot;ref-link&quot;&gt;pip&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In the official &lt;a href=&quot;https://docs.astral.sh/uv/getting-started/installation/&quot;&gt;uv installation guide&lt;/a&gt;, you’ll find several other installation options. For example, you can use tools like &lt;a href=&quot;https://brew.sh/&quot;&gt;Homebrew&lt;/a&gt; and &lt;a href=&quot;https://doc.rust-lang.org/cargo/&quot;&gt;Cargo&lt;/a&gt;, depending on your current platform and operating system. However, in this tutorial, you’ll only explore the standalone installer and the PyPI options.&lt;/p&gt;
&lt;h3 id=&quot;using-the-standalone-installer&quot;&gt;Using the Standalone Installer&lt;a class=&quot;headerlink&quot; href=&quot;#using-the-standalone-installer&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The uv project provides a standalone installer that you can use to download and install the tool in your system. Below are the relevant commands for the three main operating systems:&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.6eec2e95bede.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.6eec2e95bede.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.6eec2e95bede.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;div class=&quot;codeblock mb-3 w-100&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 d-flex justify-content-between 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.6eec2e95bede.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 style=&quot;position: relative;&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;powershell&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;-ExecutionPolicy&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ByPass&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;-c&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;irm https://astral.sh/uv/install.ps1 | iex&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.6eec2e95bede.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    &lt;template class=&quot;codeblock__copied-template&quot;&gt;
      &lt;span class=&quot;small&quot;&gt;&lt;span class=&quot;icon baseline mr-1 text-success&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.6eec2e95bede.svg#@check&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;Copied!&lt;/span&gt;
    &lt;/template&gt;
    
  &lt;/div&gt;
&lt;/div&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;div class=&quot;codeblock mb-3 w-100&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 d-flex justify-content-between 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.6eec2e95bede.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 style=&quot;position: relative;&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;curl&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;-LsSf&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;https://astral.sh/uv/install.sh&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;sh
&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.6eec2e95bede.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    &lt;template class=&quot;codeblock__copied-template&quot;&gt;
      &lt;span class=&quot;small&quot;&gt;&lt;span class=&quot;icon baseline mr-1 text-success&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.6eec2e95bede.svg#@check&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;Copied!&lt;/span&gt;
    &lt;/template&gt;
    
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;If you don’t have &lt;code&gt;curl&lt;/code&gt; installed on your system, then you can use &lt;code&gt;wget&lt;/code&gt; as shown below:&lt;/p&gt;
&lt;div class=&quot;codeblock mb-3 w-100&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 d-flex justify-content-between 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.6eec2e95bede.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 style=&quot;position: relative;&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;wget&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;-qO-&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;https://astral.sh/uv/install.sh&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;sh
&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.6eec2e95bede.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    &lt;template class=&quot;codeblock__copied-template&quot;&gt;
      &lt;span class=&quot;small&quot;&gt;&lt;span class=&quot;icon baseline mr-1 text-success&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.6eec2e95bede.svg#@check&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;Copied!&lt;/span&gt;
    &lt;/template&gt;
    
  &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;These commands will download and install the latest binary of uv in your system. If you’d like to install a specific version of the tool instead of the latest, then you can add the version number to the download URL right after the &lt;code&gt;uv/&lt;/code&gt; part:&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-2&quot; data-toggle=&quot;tab&quot; href=&quot;#windows-2&quot; role=&quot;tab&quot; aria-controls=&quot;windows-2&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.6eec2e95bede.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-2&quot; data-toggle=&quot;tab&quot; href=&quot;#linux-macos-2&quot; role=&quot;tab&quot; aria-controls=&quot;linux-macos-2&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.6eec2e95bede.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.6eec2e95bede.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&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python-uv/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-uv/ »&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: Managing Python Projects With uv: An All-in-One Solution</title>
      <id>https://realpython.com/quizzes/python-uv/</id>
      <link href="https://realpython.com/quizzes/python-uv/"/>
      <updated>2025-04-28T12:00:00+00:00</updated>
      <summary>In this quiz, you&#x27;ll test your understanding of the uv tool, a high-speed package and project manager for Python.</summary>
      <content type="html">
        &lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit how &lt;a href=&quot;https://realpython.com/python-uv/&quot;&gt;Python&amp;rsquo;s uv&lt;/a&gt; integrates multiple functionalities into one tool, offering a comprehensive solution for managing Python projects.&lt;/p&gt;
&lt;p&gt;You can use it for fast dependency installation, virtual environment management, Python version management, and project initialization, enhancing your productivity and efficiency.&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: How to Manage Python Projects With pyproject.toml</title>
      <id>https://realpython.com/quizzes/python-pyproject-toml/</id>
      <link href="https://realpython.com/quizzes/python-pyproject-toml/"/>
      <updated>2025-04-27T12:00:00+00:00</updated>
      <summary>In this quiz, you&#x27;ll test your understanding of Python&#x27;s pyproject.toml file, which simplifies Python project configuration by unifying package setup, managing dependencies, and streamlining builds.</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-pyproject-toml/&quot;&gt;&lt;code&gt;pyproject.toml&lt;/code&gt; file&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This file is a key component for defining a Python project&amp;rsquo;s build system, including its requirements and build backend. With appropriate tooling, it can also manage dependencies, optional dependencies, command-line scripts, and dynamic metadata for flexible project configuration.&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>MySQL Databases and Python</title>
      <id>https://realpython.com/courses/mysql-databases-python/</id>
      <link href="https://realpython.com/courses/mysql-databases-python/"/>
      <updated>2025-04-22T14:00:00+00:00</updated>
      <summary>In this video course, you&#x27;ll learn how to connect your Python application with a MySQL database. You&#x27;ll design a movie rating system and perform some common queries on it. You&#x27;ll also see best practices and tips to prevent SQL injection attacks.</summary>
      <content type="html">
        &lt;p&gt;&lt;a href=&quot;https://mysql.com/&quot;&gt;MySQL&lt;/a&gt; is one of the most popular &lt;a href=&quot;https://en.wikipedia.org/wiki/Database#Database_management_system&quot;&gt;database management systems (DBMSs)&lt;/a&gt; on the market today. It ranked second only to the &lt;a href=&quot;https://docs.oracle.com/cd/E11882_01/server.112/e40540/intro.htm&quot;&gt;Oracle DBMS&lt;/a&gt; in this year&amp;rsquo;s &lt;a href=&quot;https://db-engines.com/en/ranking&quot;&gt;DB-Engines Ranking&lt;/a&gt;. As most software applications need to interact with data in some form, programming languages like Python provide tools for storing and accessing these data sources.&lt;/p&gt;
&lt;p&gt;Using the techniques discussed in this video course, you&amp;rsquo;ll be able to efficiently integrate a MySQL database with a Python application. You&amp;rsquo;ll develop a small MySQL database for a movie rating system and learn how to query it directly from your Python code.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;By the end of this video course, you&amp;rsquo;ll be able to:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Identify unique features of &lt;strong&gt;MySQL&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Connect your application&lt;/strong&gt; to a MySQL database&lt;/li&gt;
&lt;li&gt;Query the database to &lt;strong&gt;fetch required data&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Handle exceptions&lt;/strong&gt; that occur while accessing the database&lt;/li&gt;
&lt;li&gt;Use &lt;strong&gt;best practices&lt;/strong&gt; while building database applications&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: Shallow vs Deep Copying of Python Objects</title>
      <id>https://realpython.com/quizzes/python-copy/</id>
      <link href="https://realpython.com/quizzes/python-copy/"/>
      <updated>2025-04-21T12:00:00+00:00</updated>
      <summary>In this quiz, you&#x27;ll test your understanding of Python&#x27;s copy module, which provides tools for creating shallow and deep copies of objects. This knowledge is crucial for managing complex, mutable data structures safely and effectively.</summary>
      <content type="html">
        &lt;p&gt;In this quiz, you&amp;rsquo;ll test your understanding of &lt;a href=&quot;https://realpython.com/python-copy/&quot;&gt;How to Copy Objects in Python: Shallow vs Deep Copy Explained&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit the concepts of shallow and deep copying, and how they affect mutable objects in Python.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast – Episode #247: Exploring DuckDB &amp; Comparing Python Expressions vs Statements</title>
      <id>https://realpython.com/podcasts/rpp/247/</id>
      <link href="https://realpython.com/podcasts/rpp/247/"/>
      <updated>2025-04-18T12:00:00+00:00</updated>
      <summary>Are you looking for a fast database that can handle large datasets in Python? What&#x27;s the difference between a Python expression and a statement? 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;Are you looking for a fast database that can handle large datasets in Python? What&#x27;s the difference between a Python expression and a statement? 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>Creating a Python Dice Roll Application</title>
      <id>https://realpython.com/courses/creating-dice-roll-application/</id>
      <link href="https://realpython.com/courses/creating-dice-roll-application/"/>
      <updated>2025-04-15T14:00:00+00:00</updated>
      <summary>In this step-by-step video course, you&#x27;ll build a dice-rolling simulator app with a minimal text-based user interface using Python. The app will simulate the rolling of up to six dice. Each individual die will have six sides.</summary>
      <content type="html">
        &lt;p&gt;In this video course, you&amp;rsquo;ll learn how to create a Python dice roll simulator. The course guides you through building a text-based user interface (TUI) application that simulates rolling dice using Python&amp;rsquo;s &lt;code&gt;random&lt;/code&gt; module. You&amp;rsquo;ll learn to gather and validate user input, use &lt;code&gt;random.randint()&lt;/code&gt; for dice rolling, and display results with ASCII art.&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;To simulate &lt;strong&gt;dice-rolling&lt;/strong&gt; events, you can use &lt;strong&gt;&lt;code&gt;random.randint()&lt;/code&gt;&lt;/strong&gt; .&lt;/li&gt;
&lt;li&gt;To get the &lt;strong&gt;user&amp;rsquo;s input&lt;/strong&gt;, you use the built-in &lt;strong&gt;&lt;code&gt;input()&lt;/code&gt;&lt;/strong&gt; function.&lt;/li&gt;
&lt;li&gt;To display dice in Python, you generate &lt;strong&gt;ASCII art representations&lt;/strong&gt; of dice faces and use &lt;strong&gt;&lt;code&gt;print()&lt;/code&gt;&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;To manipulate &lt;strong&gt;strings&lt;/strong&gt;, you use methods such as &lt;strong&gt;&lt;code&gt;.center()&lt;/code&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;code&gt;.join()&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>The Real Python Podcast – Episode #246: Learning Intermediate Python With a Deep Dive Course</title>
      <id>https://realpython.com/podcasts/rpp/246/</id>
      <link href="https://realpython.com/podcasts/rpp/246/"/>
      <updated>2025-04-11T12:00:00+00:00</updated>
      <summary>Do you want to learn deeper concepts in Python? Would the accountability of scheduled group classes help you get past the basics? This week, five Real Python Intermediate Deep Dive workshop members discuss their experiences.</summary>
      <content type="html">
        &lt;p&gt;Do you want to learn deeper concepts in Python? Would the accountability of scheduled group classes help you get past the basics? This week, five Real Python Intermediate Deep Dive workshop members discuss their experiences.&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>Checking for Membership Using Python&#x27;s &quot;in&quot; and &quot;not in&quot; Operators</title>
      <id>https://realpython.com/courses/checking-membership-in-not-in-operators/</id>
      <link href="https://realpython.com/courses/checking-membership-in-not-in-operators/"/>
      <updated>2025-04-08T14:00:00+00:00</updated>
      <summary>In this video course, you&#x27;ll learn how to check if a given value is present or absent in a collection of values using Python&#x27;s in and not in operators. This type of check is known as a membership test in Python.</summary>
      <content type="html">
        &lt;p&gt;Python&amp;rsquo;s &lt;code&gt;in&lt;/code&gt; and &lt;code&gt;not in&lt;/code&gt; operators allow you to quickly check if a given value is or isn&amp;rsquo;t part of a collection of values. This type of check is generally known as a &lt;strong&gt;membership test&lt;/strong&gt; in Python. Therefore, these operators are known as &lt;strong&gt;membership operators&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;By the end of this video course, you&amp;rsquo;ll understand that:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;&lt;code&gt;in&lt;/code&gt; operator&lt;/strong&gt; in Python is a &lt;strong&gt;membership operator&lt;/strong&gt; used to check if a value is part of a collection.&lt;/li&gt;
&lt;li&gt;You can write &lt;strong&gt;&lt;code&gt;not in&lt;/code&gt;&lt;/strong&gt; in Python to check if a value is &lt;strong&gt;absent from a collection&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Python&amp;rsquo;s membership operators work with &lt;strong&gt;several data types&lt;/strong&gt; like lists, tuples, ranges, and dictionaries.&lt;/li&gt;
&lt;li&gt;You can use &lt;strong&gt;&lt;code&gt;operator.contains()&lt;/code&gt;&lt;/strong&gt; as a function equivalent to the &lt;code&gt;in&lt;/code&gt; operator for membership testing.&lt;/li&gt;
&lt;li&gt;You can support &lt;code&gt;in&lt;/code&gt; and &lt;code&gt;not in&lt;/code&gt; in &lt;strong&gt;custom classes&lt;/strong&gt; by implementing methods like &lt;code&gt;.__contains__()&lt;/code&gt;, &lt;code&gt;.__iter__()&lt;/code&gt;, or &lt;code&gt;.__getitem__()&lt;/code&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>The Real Python Podcast – Episode #245: GUIs &amp; TUIs: Choosing a User Interface for Your Python Project</title>
      <id>https://realpython.com/podcasts/rpp/245/</id>
      <link href="https://realpython.com/podcasts/rpp/245/"/>
      <updated>2025-04-04T12:00:00+00:00</updated>
      <summary>What are the current Python graphical user interface libraries? Should you build everything in the terminal and create a text-based user interface instead? 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 current Python graphical user interface libraries? Should you build everything in the terminal and create a text-based user interface instead? 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>Building a Code Image Generator With Python</title>
      <id>https://realpython.com/courses/code-image-generator/</id>
      <link href="https://realpython.com/courses/code-image-generator/"/>
      <updated>2025-04-01T14:00:00+00:00</updated>
      <summary>In this step-by-step video course, you&#x27;ll build a code image generator that creates nice-looking images of your code snippets to share on social media. Your code image generator will be powered by the Flask web framework and include exciting packages like Pygments and Playwright.</summary>
      <content type="html">
        &lt;p&gt;If you&amp;rsquo;re active on social media, then you know that images and videos are popular forms of content. As a programmer, you mainly work with text, so sharing the content that you create on a daily basis may not seem intuitive. That&amp;rsquo;s where a code image generator comes in handy!&lt;/p&gt;
&lt;p&gt;A code image generator allows you to turn your code snippets into visually appealing images, so you can share your work without worrying about formatting issues, syntax highlighting inconsistencies, or character count limits.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this step-by-step video course, you&amp;rsquo;ll learn how to:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Set up and run a &lt;strong&gt;Flask project&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Connect and style &lt;strong&gt;Jinja templates&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Use &lt;strong&gt;Playwright&lt;/strong&gt; to create images&lt;/li&gt;
&lt;li&gt;Beautify code with &lt;strong&gt;Pygments&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Leverage &lt;strong&gt;sessions&lt;/strong&gt; to save browser states&lt;/li&gt;
&lt;li&gt;Enhance the user experience with &lt;strong&gt;JavaScript&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>What Can You Do With Python?</title>
      <id>https://realpython.com/courses/what-can-you-do-with-python/</id>
      <link href="https://realpython.com/courses/what-can-you-do-with-python/"/>
      <updated>2025-03-25T14:00:00+00:00</updated>
      <summary>In this video course, you&#x27;ll find a set of guidelines that will help you start applying your Python skills to solve real-world problems. By the end, you&#x27;ll be able to answer the question, &quot;What can you do with Python?&quot;</summary>
      <content type="html">
        &lt;p&gt;You&amp;rsquo;ve finished a course or finally made it to the end of a &lt;a href=&quot;https://realpython.com/products/python-basics-book/&quot;&gt;book&lt;/a&gt; that teaches you the &lt;a href=&quot;https://realpython.com/learning-paths/python3-introduction/&quot;&gt;basics of programming with Python&lt;/a&gt;. You&amp;rsquo;ve learned about &lt;a href=&quot;https://realpython.com/python-variables/&quot;&gt;variables&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python-lists-tuples/&quot;&gt;lists, tuples&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python-dicts/&quot;&gt;dictionaries&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python-for-loop/&quot;&gt;&lt;code&gt;for&lt;/code&gt;&lt;/a&gt; and &lt;a href=&quot;https://realpython.com/python-while-loop/&quot;&gt;&lt;code&gt;while&lt;/code&gt;&lt;/a&gt; loops, &lt;a href=&quot;https://realpython.com/python-conditional-statements/&quot;&gt;conditional statements&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python3-object-oriented-programming/&quot;&gt;object-oriented concepts&lt;/a&gt;, and more. So, what&amp;rsquo;s next? What can you do with Python nowadays?&lt;/p&gt;
&lt;p&gt;Python is a versatile programming language with many use cases in a variety of different fields. If you&amp;rsquo;ve grasped the basics of Python and are itching to build something with the language, then it&amp;rsquo;s time to figure out what your next step should be.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this video course, you&amp;rsquo;ll see how you can use Python for:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Doing general &lt;strong&gt;software development&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Diving into &lt;strong&gt;data science and math&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Speeding up and automating your &lt;strong&gt;workflow&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Building &lt;strong&gt;embedded systems&lt;/strong&gt; and &lt;strong&gt;robots&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>The Real Python Podcast – Episode #244: A Decade of Automating the Boring Stuff With Python</title>
      <id>https://realpython.com/podcasts/rpp/244/</id>
      <link href="https://realpython.com/podcasts/rpp/244/"/>
      <updated>2025-03-21T12:00:00+00:00</updated>
      <summary>What goes into updating one of the most popular books about working with Python? After a decade of changes in the Python landscape, what projects, libraries, and skills are relevant to an office worker? This week on the show, we speak with previous guest Al Sweigart about the third edition of &quot;Automate the Boring Stuff With Python.&quot;</summary>
      <content type="html">
        &lt;p&gt;What goes into updating one of the most popular books about working with Python? After a decade of changes in the Python landscape, what projects, libraries, and skills are relevant to an office worker? This week on the show, we speak with previous guest Al Sweigart about the third edition of &quot;Automate the Boring Stuff With Python.&quot;&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast – Episode #243: Manage Projects With pyproject.toml &amp; Explore Polars LazyFrames</title>
      <id>https://realpython.com/podcasts/rpp/243/</id>
      <link href="https://realpython.com/podcasts/rpp/243/"/>
      <updated>2025-03-14T12:00:00+00:00</updated>
      <summary>How can you simplify the management of your Python projects with one file? What are the advantages of using LazyFrames in Polars? 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 can you simplify the management of your Python projects with one file? What are the advantages of using LazyFrames in Polars? 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>The Real Python Podcast – Episode #242: Eric Matthes: Maybe Don&#x27;t Start With Unit Tests</title>
      <id>https://realpython.com/podcasts/rpp/242/</id>
      <link href="https://realpython.com/podcasts/rpp/242/"/>
      <updated>2025-03-07T12:00:00+00:00</updated>
      <summary>Should you always start testing your code with unit tests? When does it make sense to look at integration or end-to-end testing as a first step instead? This week on the show, we speak with previous guest Eric Matthes about where to begin testing your code.</summary>
      <content type="html">
        &lt;p&gt;Should you always start testing your code with unit tests? When does it make sense to look at integration or end-to-end testing as a first step instead? This week on the show, we speak with previous guest Eric Matthes about where to begin testing your code.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  

</feed>
