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

  
    <entry>
      <title>The Real Python Podcast – Episode #187: Serializing Data With Python &amp; Underscore Naming Conventions</title>
      <id>https://realpython.com/podcasts/rpp/187/</id>
      <link href="https://realpython.com/podcasts/rpp/187/"/>
      <updated>2024-01-12T12:00:00+00:00</updated>
      <summary>Do you need to transfer an extensive data collection for a science project? What&#x27;s the best way to send executable code over the wire for distributed processing? What are the different ways to serialize data in Python? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder&#x27;s Weekly articles and projects.</summary>
      <content type="html">
        &lt;p&gt;Do you need to transfer an extensive data collection for a science project? What&#x27;s the best way to send executable code over the wire for distributed processing? What are the different ways to serialize data in Python? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder&#x27;s Weekly articles and projects.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Python range(): Represent Numerical Ranges</title>
      <id>https://realpython.com/python-range/</id>
      <link href="https://realpython.com/python-range/"/>
      <updated>2024-01-10T14:00:00+00:00</updated>
      <summary>Master the Python range() function and learn how it works under the hood. You most commonly use ranges in loops. In this tutorial, you&#x27;ll learn how to iterate over ranges but also identify when there are better alternatives.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;A &lt;code&gt;range&lt;/code&gt; is a Python object that represents an interval of integers. Usually, the numbers are consecutive, but you can also specify that you want to space them out. You can create ranges by calling &lt;code&gt;range()&lt;/code&gt; with one, two, or three arguments, as the following examples show:&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;&gt;&lt;span class=&quot;icon baseline js-codeblock-output-on codeblock__header--icon-lower&quot;&gt;&lt;svg&gt;&lt;use href=&quot;/static/icons.55e8f03acfe3.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;nb&quot;&gt;list&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;range&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;[0, 1, 2, 3, 4]&lt;/span&gt;

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

&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;list&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;range&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;20&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;[1, 3, 5, 7, 9, 11, 13, 15, 17, 19]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot;&gt;&lt;span class=&quot;icon baseline&quot;&gt;&lt;svg&gt;&lt;use href=&quot;/static/icons.55e8f03acfe3.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;&gt;&lt;svg&gt;&lt;use href=&quot;/static/icons.55e8f03acfe3.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 each example, you use &lt;a href=&quot;https://realpython.com/python-list/#using-the-list-constructor&quot;&gt;&lt;code&gt;list()&lt;/code&gt;&lt;/a&gt; to explicitly list the individual elements of each range. You’ll study these examples in more detail soon.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this tutorial, you’ll learn how you can:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Create &lt;code&gt;range&lt;/code&gt; objects that represent ranges of &lt;strong&gt;consecutive integers&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Represent ranges of &lt;strong&gt;spaced-out numbers&lt;/strong&gt; with a fixed step&lt;/li&gt;
&lt;li&gt;Decide when &lt;code&gt;range&lt;/code&gt; is a &lt;strong&gt;good solution&lt;/strong&gt; for your use case&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Avoid &lt;code&gt;range&lt;/code&gt;&lt;/strong&gt; in most loops&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;A &lt;code&gt;range&lt;/code&gt; can sometimes be a powerful tool. However, throughout this tutorial, you’ll also explore alternatives that may work better in some situations. You can click the link below to download the code that you’ll see in this tutorial:&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown=&quot;1&quot;&gt;Get Your Code:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/python-range-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-python-range-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 represent numerical ranges in Python.&lt;/p&gt;
&lt;/div&gt;
&lt;h2 id=&quot;construct-numerical-ranges&quot;&gt;Construct Numerical Ranges&lt;a class=&quot;headerlink&quot; href=&quot;#construct-numerical-ranges&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;In Python, &lt;code&gt;range()&lt;/code&gt; is &lt;strong&gt;built in&lt;/strong&gt;. This means that you can always call &lt;code&gt;range()&lt;/code&gt; without doing any preparations first. Calling &lt;code&gt;range()&lt;/code&gt; constructs a &lt;strong&gt;range object&lt;/strong&gt; that you can put to use. Later, you’ll see practical examples of how to use range objects.&lt;/p&gt;
&lt;p&gt;You can provide &lt;code&gt;range()&lt;/code&gt; with one, two, or three &lt;strong&gt;integer&lt;/strong&gt; arguments. This corresponds to three different use cases:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Ranges counting from zero&lt;/li&gt;
&lt;li&gt;Ranges of consecutive numbers&lt;/li&gt;
&lt;li&gt;Ranges stepping over numbers&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;You’ll learn how to use each of these next.&lt;/p&gt;
&lt;h3 id=&quot;count-from-zero&quot;&gt;Count From Zero&lt;a class=&quot;headerlink&quot; href=&quot;#count-from-zero&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;When you call &lt;code&gt;range()&lt;/code&gt; with one argument, you create a range that counts from zero and up to, but not including, the number you provided:&lt;/p&gt;
&lt;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;&gt;&lt;span class=&quot;icon baseline js-codeblock-output-on codeblock__header--icon-lower&quot;&gt;&lt;svg&gt;&lt;use href=&quot;/static/icons.55e8f03acfe3.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;nb&quot;&gt;range&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;range(0, 5)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot;&gt;&lt;span class=&quot;icon baseline&quot;&gt;&lt;svg&gt;&lt;use href=&quot;/static/icons.55e8f03acfe3.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;&gt;&lt;svg&gt;&lt;use href=&quot;/static/icons.55e8f03acfe3.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, you’ve created a range from zero to five. To see the individual elements in the range, you can use &lt;code&gt;list()&lt;/code&gt; to convert the range to a &lt;a href=&quot;https://realpython.com/python-list/&quot;&gt;list&lt;/a&gt;:&lt;/p&gt;
&lt;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;&gt;&lt;span class=&quot;icon baseline js-codeblock-output-on codeblock__header--icon-lower&quot;&gt;&lt;svg&gt;&lt;use href=&quot;/static/icons.55e8f03acfe3.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;nb&quot;&gt;list&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;range&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;[0, 1, 2, 3, 4]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot;&gt;&lt;span class=&quot;icon baseline&quot;&gt;&lt;svg&gt;&lt;use href=&quot;/static/icons.55e8f03acfe3.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;&gt;&lt;svg&gt;&lt;use href=&quot;/static/icons.55e8f03acfe3.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;Inspecting &lt;code&gt;range(5)&lt;/code&gt; shows that it contains the numbers zero, one, two, three, and four. Five itself is not a part of the range. One nice property of these ranges is that the argument, &lt;code&gt;5&lt;/code&gt; in this case, is the same as the number of elements in the range.&lt;/p&gt;
&lt;h3 id=&quot;count-from-start-to-stop&quot;&gt;Count From Start to Stop&lt;a class=&quot;headerlink&quot; href=&quot;#count-from-start-to-stop&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;You can call &lt;code&gt;range()&lt;/code&gt; with two arguments. The first value will be the start of the range. As before, the range will count up to, but not include, the second value:&lt;/p&gt;
&lt;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;&gt;&lt;span class=&quot;icon baseline js-codeblock-output-on codeblock__header--icon-lower&quot;&gt;&lt;svg&gt;&lt;use href=&quot;/static/icons.55e8f03acfe3.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;nb&quot;&gt;range&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;range(1, 7)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot;&gt;&lt;span class=&quot;icon baseline&quot;&gt;&lt;svg&gt;&lt;use href=&quot;/static/icons.55e8f03acfe3.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;&gt;&lt;svg&gt;&lt;use href=&quot;/static/icons.55e8f03acfe3.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 representation of a range object just shows you the arguments that you provided, so it’s not super helpful in this case. You can use &lt;code&gt;list()&lt;/code&gt; to inspect the individual elements:&lt;/p&gt;
&lt;div 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;&gt;&lt;span class=&quot;icon baseline js-codeblock-output-on codeblock__header--icon-lower&quot;&gt;&lt;svg&gt;&lt;use href=&quot;/static/icons.55e8f03acfe3.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;nb&quot;&gt;list&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;range&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;[1, 2, 3, 4, 5, 6]&lt;/span&gt;
&lt;/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;&gt;&lt;svg&gt;&lt;use href=&quot;/static/icons.55e8f03acfe3.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;&gt;&lt;svg&gt;&lt;use href=&quot;/static/icons.55e8f03acfe3.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;Observe that &lt;code&gt;range(1, 7)&lt;/code&gt; starts at one and includes the consecutive numbers up to six. Seven is the limit of the range and isn’t included. You can calculate the number of elements in a range by subtracting the start value from the end value. In this example, there are &lt;em&gt;7 - 1 = 6&lt;/em&gt; elements.&lt;/p&gt;
&lt;h3 id=&quot;count-from-start-to-stop-while-stepping-over-numbers&quot;&gt;Count From Start to Stop While Stepping Over Numbers&lt;a class=&quot;headerlink&quot; href=&quot;#count-from-start-to-stop-while-stepping-over-numbers&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python-range/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-range/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Python Basics Exercises: Functions and Loops</title>
      <id>https://realpython.com/courses/python-exercises-functions-loops/</id>
      <link href="https://realpython.com/courses/python-exercises-functions-loops/"/>
      <updated>2024-01-09T14:00:00+00:00</updated>
      <summary>In this Python Basics Exercises course, you&#x27;ll practice creating user-defined functions that you can execute multiple times in your code. Additionally, you&#x27;ll gain experience in repeating code using for and while loops.</summary>
      <content type="html">
        &lt;p&gt;As you learned in &lt;a href=&quot;https://realpython.com/courses/python-basics-functions-loops/&quot;&gt;Python Basics: Functions and Loops&lt;/a&gt;, functions serve as the fundamental building blocks in almost every Python program. They&amp;rsquo;re where the real action happens!&lt;/p&gt;
&lt;p&gt;You now know that functions are crucial for breaking down code into smaller, manageable chunks. They enable you to define actions that your program can execute repeatedly throughout your code. Instead of duplicating the same code whenever your program needs to accomplish a particular task, you can simply call the function.&lt;/p&gt;
&lt;p&gt;However, there are instances when you need to repeat certain code multiple times in a row. This is where loops become invaluable.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this Python Basics Exercises video course, you&amp;rsquo;ll practice:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Creating &lt;strong&gt;user-defined functions&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Implementing &lt;strong&gt;&lt;code&gt;for&lt;/code&gt; loops&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Getting &lt;strong&gt;user input&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Rounding&lt;/strong&gt; numbers&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This video course is part of the Python Basics series, which accompanies &lt;a href=&quot;https://realpython.com/products/python-basics-book/&quot;&gt;&lt;em&gt;Python Basics: A Practical Introduction to Python 3&lt;/em&gt;&lt;/a&gt;. You can also check out the other &lt;a href=&quot;https://realpython.com/learning-paths/python-basics/&quot;&gt;Python Basics courses&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;Note that you&amp;rsquo;ll be using &lt;a href=&quot;https://realpython.com/python-idle/&quot;&gt;IDLE&lt;/a&gt; to &lt;a href=&quot;https://realpython.com/interacting-with-python/&quot;&gt;interact with Python&lt;/a&gt; throughout this course.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Learn From 2023&#x27;s Most Popular Python Tutorials and Courses</title>
      <id>https://realpython.com/popular-python-tutorials-2023/</id>
      <link href="https://realpython.com/popular-python-tutorials-2023/"/>
      <updated>2024-01-08T14:00:00+00:00</updated>
      <summary>Revisit your favorite Real Python tutorials and video courses from 2023. Explore various topics, from Python basics to web development, machine learning, and effective coding environments. It&#x27;s been a busy year of learning, and there&#x27;s something for everyone to discover and build upon in 2024.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Python is always getting better, and 2023 brought a number of exciting developments. As part of the &lt;a href=&quot;https://github.com/faster-cpython&quot;&gt;Faster CPython&lt;/a&gt; project, &lt;a href=&quot;https://realpython.com/python312-new-features/&quot;&gt;Python 3.12&lt;/a&gt; is speedier than previous versions. The new release brings &lt;a href=&quot;https://realpython.com/python312-error-messages/&quot;&gt;improved error messages&lt;/a&gt; and &lt;a href=&quot;https://realpython.com/python312-f-strings/&quot;&gt;more powerful f-strings&lt;/a&gt;. You can also enjoy &lt;a href=&quot;https://realpython.com/python312-perf-profiler/&quot;&gt;support for the Linux &lt;code&gt;perf&lt;/code&gt; profiler&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python312-typing/&quot;&gt;static typing improvements&lt;/a&gt;, and &lt;a href=&quot;https://realpython.com/python312-subinterpreters/&quot;&gt;changes to subinterpreters&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The Python Software Foundation (PSF) focused on enhancing security in 2023, with the help of inaugural &lt;a href=&quot;https://realpython.com/podcasts/rpp/177/&quot;&gt;Security Developer-in-Residence Seth Michael Larson&lt;/a&gt;. As part of this comprehensive effort, PyPI completed its &lt;a href=&quot;https://blog.pypi.org/posts/2023-11-14-1-pypi-completes-first-security-audit/&quot;&gt;first security audit&lt;/a&gt;. Plus, the year brought new major versions of &lt;a href=&quot;https://realpython.com/learning-paths/pandas-data-science/&quot;&gt;pandas&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/tutorials/django/&quot;&gt;Django&lt;/a&gt;, and &lt;a href=&quot;https://realpython.com/python-news-june-2023/#pydantic-2-released&quot;&gt;Pydantic&lt;/a&gt;. Another exciting development was &lt;a href=&quot;https://realpython.com/python-news-september-2023/#modular-releases-mojo-sdk-for-linux&quot;&gt;Mojo&lt;/a&gt;, a superset of Python that’s specifically designed for use in machine-learning contexts.&lt;/p&gt;
&lt;p&gt;Here at Real Python, we’ve published over a hundred written tutorials and video courses this year, plus weekly &lt;a href=&quot;https://realpython.com/podcasts/rpp/&quot;&gt;podcast&lt;/a&gt; episodes. Keep reading to revisit an old favorite or embark on a new learning journey. You can also check out the &lt;a href=&quot;https://realpython.com/podcasts/rpp/185/&quot;&gt;wrap-up podcast episode&lt;/a&gt;.&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;practice-your-skills&quot;&gt;Practice Your Skills&lt;a class=&quot;headerlink&quot; href=&quot;#practice-your-skills&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;figure class=&quot;&quot;&gt;&lt;img loading=&quot;lazy&quot; class=&quot;img-fluid w-33 float-right ml-3 mt-3 mb-3 rounded&quot; src=&quot;https://files.realpython.com/media/Object-Oriented-Programming-OOP_Watermarked.df1bfba08d93.jpg&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;https://robocrop.realpython.net/?url=https%3A//files.realpython.com/media/Object-Oriented-Programming-OOP_Watermarked.df1bfba08d93.jpg&amp;amp;w=480&amp;amp;sig=f71ffce11415f5a49f809b3d7f12390dbc87a559 480w, https://robocrop.realpython.net/?url=https%3A//files.realpython.com/media/Object-Oriented-Programming-OOP_Watermarked.df1bfba08d93.jpg&amp;amp;w=640&amp;amp;sig=a03f9cb95d1b368a8cc3b53c7bdd52722475def5 640w, https://robocrop.realpython.net/?url=https%3A//files.realpython.com/media/Object-Oriented-Programming-OOP_Watermarked.df1bfba08d93.jpg&amp;amp;w=960&amp;amp;sig=a7728a6072626f05c24c60e6971762ad75c6ad43 960w, https://files.realpython.com/media/Object-Oriented-Programming-OOP_Watermarked.df1bfba08d93.jpg 1920w&quot; sizes=&quot;(min-width: 1200px) 690px, (min-width: 780px) calc(-5vw + 669px), (min-width: 580px) 510px, calc(100vw - 30px)&quot; alt=&quot;Python Basics: Object-Oriented Programming&quot; data-asset=&quot;4819&quot;&gt;&lt;/figure&gt;

&lt;p&gt;Practice makes perfect, especially when it comes to programming. This year, the Real Python team expanded the &lt;a href=&quot;https://realpython.com/learning-paths/python-basics/&quot;&gt;Python Basics&lt;/a&gt; learning path with exercises designed to strengthen your Python skills and help you apply your knowledge in real-world scenarios. &lt;/p&gt;
&lt;p&gt;In these courses, you can test your knowledge by completing review exercises and challenges before comparing your work to the instructors’ solutions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/courses/numbers-and-math-exercises/&quot;&gt;Python Basics Exercises: Numbers and Math&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/courses/object-oriented-programming-exercises/&quot;&gt;Python Basics Exercises: Object-Oriented Programming&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/courses/python-modules-packages-exercises/&quot;&gt;Python Basics Exercises: Modules and Packages&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;By actively engaging with these exercises, you’ll solidify your understanding of Python concepts and build confidence in your programming abilities. Another way to test your knowledge is by taking &lt;a href=&quot;https://realpython.com/quizzes/&quot;&gt;quizzes&lt;/a&gt;, and we added several in 2023. For help along the way, be sure to join Real Python’s &lt;a href=&quot;https://realpython.com/community/&quot;&gt;community chat&lt;/a&gt; and weekly &lt;a href=&quot;https://realpython.com/office-hours/&quot;&gt;office hours&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;customize-your-coding-environment&quot;&gt;Customize Your Coding Environment&lt;a class=&quot;headerlink&quot; href=&quot;#customize-your-coding-environment&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;figure class=&quot;&quot;&gt;&lt;img loading=&quot;lazy&quot; class=&quot;img-fluid w-33 float-right ml-3 mt-3 mb-3 rounded&quot; src=&quot;https://files.realpython.com/media/How-to-Choose-a-Programming-Font-for-Python_Watermarked.2d22196d7347.jpg&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;https://robocrop.realpython.net/?url=https%3A//files.realpython.com/media/How-to-Choose-a-Programming-Font-for-Python_Watermarked.2d22196d7347.jpg&amp;amp;w=480&amp;amp;sig=f8f118caa713e1c99e6a6db462d2fc09f4f9d089 480w, https://robocrop.realpython.net/?url=https%3A//files.realpython.com/media/How-to-Choose-a-Programming-Font-for-Python_Watermarked.2d22196d7347.jpg&amp;amp;w=640&amp;amp;sig=c052a0fb298cef7f9aff004fb6f9b824fe4e2d3f 640w, https://robocrop.realpython.net/?url=https%3A//files.realpython.com/media/How-to-Choose-a-Programming-Font-for-Python_Watermarked.2d22196d7347.jpg&amp;amp;w=960&amp;amp;sig=af70abc7005a73d5f101aae9e1fd7771d11f9e3c 960w, https://files.realpython.com/media/How-to-Choose-a-Programming-Font-for-Python_Watermarked.2d22196d7347.jpg 1920w&quot; sizes=&quot;(min-width: 1200px) 690px, (min-width: 780px) calc(-5vw + 669px), (min-width: 580px) 510px, calc(100vw - 30px)&quot; alt=&quot;Choosing the Best Coding Font for Programming&quot; data-asset=&quot;5176&quot;&gt;&lt;/figure&gt;

&lt;p&gt;Your coding environment plays a crucial role in your productivity as a programmer, so it’s definitely worthwhile to explore your options and make yourself at home. That means picking the perfect &lt;a href=&quot;https://realpython.com/python-ides-code-editors-guide/&quot;&gt;editor or IDE&lt;/a&gt; for your use case and then tweaking how it works for you.&lt;/p&gt;
&lt;p&gt;In these tutorials, you’ll learn how to customize your coding environment to suit your needs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/ptpython-shell/&quot;&gt;Boost Your Coding Productivity With Ptpython&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/coding-font/&quot;&gt;Choosing the Best Coding Font for Programming&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/using-jupyterlab/&quot;&gt;JupyterLab for an Enhanced Notebook Experience&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;By exploring these resources, you’ll discover &lt;a href=&quot;https://realpython.com/tutorials/tools/&quot;&gt;tools&lt;/a&gt; and techniques that can enhance your coding experience, making you more efficient and comfortable as you write Python code.&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/popular-python-tutorials-2023/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/popular-python-tutorials-2023/ »&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 #186: Exploring Python in Excel</title>
      <id>https://realpython.com/podcasts/rpp/186/</id>
      <link href="https://realpython.com/podcasts/rpp/186/"/>
      <updated>2024-01-05T12:00:00+00:00</updated>
      <summary>Are you interested in using your Python skills within Excel? Would you like to share a data science project or visualization as a single Office file? This week on the show, we speak with Principal Architect John Lam and Sr. Cloud Developer Advocate Sarah Kaiser from Microsoft about Python in Excel.</summary>
      <content type="html">
        &lt;p&gt;Are you interested in using your Python skills within Excel? Would you like to share a data science project or visualization as a single Office file? This week on the show, we speak with Principal Architect John Lam and Sr. Cloud Developer Advocate Sarah Kaiser from Microsoft about Python in Excel.&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 Magic Methods: Leverage Their Power in Your Classes</title>
      <id>https://realpython.com/python-magic-methods/</id>
      <link href="https://realpython.com/python-magic-methods/"/>
      <updated>2024-01-03T14:00:00+00:00</updated>
      <summary>In this tutorial, you&#x27;ll learn what magic methods are in Python, how they work, and how to use them in your custom classes to support powerful features in your object-oriented code.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;As a Python developer who wants to harness the power of object-oriented programming, you’ll love to learn how to customize your classes using &lt;strong&gt;special methods&lt;/strong&gt;, also known as &lt;strong&gt;magic methods&lt;/strong&gt; or &lt;strong&gt;dunder methods&lt;/strong&gt;. A special method is a method whose name starts and ends with a double underscore. These methods have special meanings for Python.&lt;/p&gt;
&lt;p&gt;Python automatically calls magic methods as a response to certain operations, such as instantiation, sequence indexing, attribute managing, and much more. Magic methods support core object-oriented features in Python, so learning about them is fundamental for you as a Python programmer.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this tutorial, you’ll:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Learn what Python’s &lt;strong&gt;special&lt;/strong&gt; or &lt;strong&gt;magic methods&lt;/strong&gt; are&lt;/li&gt;
&lt;li&gt;Understand the &lt;strong&gt;magic&lt;/strong&gt; behind magic methods in Python&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Customize&lt;/strong&gt; different &lt;strong&gt;behaviors&lt;/strong&gt; of your custom classes with special methods&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To get the most out of this tutorial, you should be familiar with general Python programming. More importantly, you should know the basics of &lt;a href=&quot;https://realpython.com/python3-object-oriented-programming/&quot;&gt;object-oriented programming&lt;/a&gt; and &lt;a href=&quot;https://realpython.com/python-classes/&quot;&gt;classes&lt;/a&gt; in Python.&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-magic-methods-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-python-magic-methods-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 Python’s magic methods in your classes.&lt;/p&gt;
&lt;/div&gt;
&lt;h2 id=&quot;getting-to-know-pythons-magic-or-special-methods&quot;&gt;Getting to Know Python’s Magic or Special Methods&lt;a class=&quot;headerlink&quot; href=&quot;#getting-to-know-pythons-magic-or-special-methods&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;In Python, &lt;a href=&quot;https://docs.python.org/3/glossary.html#term-special-method&quot;&gt;special methods&lt;/a&gt; are also called &lt;strong&gt;magic methods&lt;/strong&gt;, or &lt;strong&gt;dunder methods&lt;/strong&gt;. This latter terminology, &lt;a href=&quot;https://realpython.com/python-double-underscore/#dunder-names-in-python&quot;&gt;dunder&lt;/a&gt;, refers to a particular naming convention that Python uses to name its special &lt;a href=&quot;https://realpython.com/python-classes/#providing-behavior-with-methods&quot;&gt;methods&lt;/a&gt; and &lt;a href=&quot;https://realpython.com/python-classes/#attaching-data-to-classes-and-instances&quot;&gt;attributes&lt;/a&gt;. The convention is to use double leading and trailing underscores in the name at hand, so it looks like &lt;code&gt;.__method__()&lt;/code&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 this tutorial, you’ll find the terms &lt;strong&gt;special methods&lt;/strong&gt;, &lt;strong&gt;dunder methods&lt;/strong&gt;, and &lt;strong&gt;magic methods&lt;/strong&gt; used interchangeably.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;The double underscores flag these methods as core to some Python features. They help avoid name collisions with your own methods and attributes. Some popular and well-known magic methods include the following:&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;Special Method&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;a href=&quot;https://realpython.com/python-class-constructor/#object-initialization-with-__init__&quot;&gt;&lt;code&gt;.__init__()&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Provides an initializer in Python classes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://realpython.com/python-repr-vs-str/&quot;&gt;&lt;code&gt;.__str__()&lt;/code&gt; and &lt;code&gt;.__repr__()&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Provide string representations for objects&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://realpython.com/python-callable-instances/&quot;&gt;&lt;code&gt;.__call__()&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Makes the instances of a class callable&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://realpython.com/len-python-function/&quot;&gt;&lt;code&gt;.__len__()&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Supports the &lt;a href=&quot;https://realpython.com/len-python-function/&quot;&gt;&lt;code&gt;len()&lt;/code&gt;&lt;/a&gt; function&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;This is just a tiny sample of all the special methods that Python has. All these methods support specific features that are core to Python and its object-oriented infrastructure.&lt;/p&gt;
&lt;div class=&quot;alert alert-primary&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; For the complete list of magic methods, refer to the &lt;a href=&quot;https://docs.python.org/3/reference/datamodel.html#specialnames&quot;&gt;special method section&lt;/a&gt; on the data model page of Python’s official documentation.&lt;/p&gt;
&lt;p&gt;The Python documentation organizes the methods into several distinct groups:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.python.org/3/reference/datamodel.html#basic-customization&quot;&gt;Basic customization&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.python.org/3/reference/datamodel.html#customizing-attribute-access&quot;&gt;Customizing attribute access&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.python.org/3/reference/datamodel.html#customizing-class-creation&quot;&gt;Customizing class creation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.python.org/3/reference/datamodel.html#customizing-instance-and-subclass-checks&quot;&gt;Customizing instance and subclass checks&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.python.org/3/reference/datamodel.html#emulating-generic-types&quot;&gt;Emulating generic types&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.python.org/3/reference/datamodel.html#emulating-callable-objects&quot;&gt;Emulating callable objects&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.python.org/3/reference/datamodel.html#emulating-container-types&quot;&gt;Emulating container types&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.python.org/3/reference/datamodel.html#emulating-numeric-types&quot;&gt;Emulating numeric types&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.python.org/3/reference/datamodel.html#with-statement-context-managers&quot;&gt;&lt;code&gt;with&lt;/code&gt; statement context managers&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.python.org/3/reference/datamodel.html#customizing-positional-arguments-in-class-pattern-matching&quot;&gt;Customizing positional arguments in class pattern matching&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.python.org/3/reference/datamodel.html#emulating-buffer-types&quot;&gt;Emulating buffer types&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.python.org/3/reference/datamodel.html#special-method-lookup&quot;&gt;Special method lookup&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Take a look at the documentation for more details on how the methods work and how to use them according to your specific needs.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Here’s how the Python documentation defines the term &lt;strong&gt;special methods&lt;/strong&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;A method that is called implicitly by Python to execute a certain operation on a type, such as addition. Such methods have names starting and ending with double underscores. (&lt;a href=&quot;https://docs.python.org/3/glossary.html#term-special-method&quot;&gt;Source&lt;/a&gt;)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;There’s an important detail to highlight in this definition. &lt;em&gt;Python implicitly calls special methods to execute certain operations in your code&lt;/em&gt;. For example, when you run the addition &lt;code&gt;5 + 2&lt;/code&gt; in a &lt;a href=&quot;https://realpython.com/python-repl/&quot;&gt;REPL&lt;/a&gt; session, Python internally runs the following code under the hood:&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;&gt;&lt;span class=&quot;icon baseline js-codeblock-output-on codeblock__header--icon-lower&quot;&gt;&lt;svg&gt;&lt;use href=&quot;/static/icons.55e8f03acfe3.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;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;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;fm&quot;&gt;__add__&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;7&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot;&gt;&lt;span class=&quot;icon baseline&quot;&gt;&lt;svg&gt;&lt;use href=&quot;/static/icons.55e8f03acfe3.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;&gt;&lt;svg&gt;&lt;use href=&quot;/static/icons.55e8f03acfe3.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;.__add__()&lt;/code&gt; special method of integer numbers supports the addition that you typically run as &lt;code&gt;5 + 2&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Reading between the lines, you’ll realize that even though you can directly call special methods, they’re not intended for direct use. You shouldn’t call them directly in your code. Instead, you should rely on Python to call them automatically in response to a given operation.&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; Even though special methods are also called &lt;em&gt;magic methods&lt;/em&gt;, some people in the Python community may not like this latter terminology. The only magic around these methods is that Python calls them implicitly under the hood. So, the official documentation refers to them as &lt;strong&gt;special methods&lt;/strong&gt; instead.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Magic methods exist for many purposes. All the available magic methods support built-in features and play specific roles in the language. For example, built-in types such as &lt;a href=&quot;https://realpython.com/python-list/&quot;&gt;lists&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python-strings/&quot;&gt;strings&lt;/a&gt;, and &lt;a href=&quot;https://realpython.com/python-dicts/&quot;&gt;dictionaries&lt;/a&gt; implement most of their core functionality using magic methods. In your custom classes, you can use magic methods to make callable objects, define how objects are compared, tweak how you create objects, and more.&lt;/p&gt;
&lt;p&gt;Note that because magic methods have special meaning for Python itself, you should avoid naming custom methods using leading and trailing double underscores. Your custom method won’t trigger any Python action if its name doesn’t match any official special method names, but it’ll certainly confuse other programmers. New dunder names may also be introduced in future versions of Python.&lt;/p&gt;
&lt;p&gt;Magic methods are core to Python’s &lt;a href=&quot;https://docs.python.org/3/reference/datamodel.html&quot;&gt;data model&lt;/a&gt; and are a fundamental part of object-oriented programming in Python. In the following sections, you’ll learn about some of the most commonly used special methods. They’ll help you write better object-oriented code in your day-to-day programming adventure.&lt;/p&gt;
&lt;h2 id=&quot;controlling-the-object-creation-process&quot;&gt;Controlling the Object Creation Process&lt;a class=&quot;headerlink&quot; href=&quot;#controlling-the-object-creation-process&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;When creating custom classes in Python, probably the first and most common method that you implement is &lt;code&gt;.__init__()&lt;/code&gt;. This method works as an &lt;strong&gt;initializer&lt;/strong&gt; because it allows you to provide initial values to any &lt;a href=&quot;https://realpython.com/python-classes/#instance-attributes&quot;&gt;instance attributes&lt;/a&gt; that you define in your classes.&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python-magic-methods/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-magic-methods/ »&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>HTTP Requests With Python&#x27;s urllib.request</title>
      <id>https://realpython.com/courses/python-urllib-request/</id>
      <link href="https://realpython.com/courses/python-urllib-request/"/>
      <updated>2024-01-02T14:00:00+00:00</updated>
      <summary>In this video course, you&#x27;ll explore how to make HTTP requests using Python&#x27;s handy built-in module, urllib.request. You&#x27;ll try out examples and go over common errors, all while learning more about HTTP requests and Python in general.</summary>
      <content type="html">
        &lt;p&gt;If you need to perform HTTP requests using Python, then the widely used &lt;a href=&quot;https://docs.python-requests.org/en/latest/&quot;&gt;Requests&lt;/a&gt; library is often the way to go. However, if you prefer to use only standard-library Python and minimize dependencies, then you can turn to &lt;code&gt;urllib.request&lt;/code&gt; instead.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this video course, you&amp;rsquo;ll:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Learn the essentials of making basic &lt;a href=&quot;https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_and_response_messages_through_connections&quot;&gt;HTTP requests&lt;/a&gt; with &lt;code&gt;urllib.request&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Explore the inner workings of an &lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Web/HTTP/Messages&quot;&gt;HTTP message&lt;/a&gt; and how &lt;code&gt;urllib.request&lt;/code&gt; represents it&lt;/li&gt;
&lt;li&gt;Grasp the concept of handling &lt;strong&gt;character encodings&lt;/strong&gt; in HTTP messages&lt;/li&gt;
&lt;li&gt;Understand common hiccups when using &lt;code&gt;urllib.request&lt;/code&gt; and learn how to resolve them&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you&amp;rsquo;re already familiar with HTTP requests such as &lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/GET&quot;&gt;GET&lt;/a&gt; and &lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST&quot;&gt;POST&lt;/a&gt;, then you&amp;rsquo;re well prepared for this video course. Additionally, you should have prior experience using Python to &lt;a href=&quot;https://realpython.com/read-write-files-python/&quot;&gt;read and write files&lt;/a&gt;, ideally using a &lt;a href=&quot;https://realpython.com/python-with-statement/&quot;&gt;context manager&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In the end, you&amp;rsquo;ll discover that making HTTP requests doesn&amp;rsquo;t have to be a frustrating experience, despite its reputation. Many of the challenges people face in this process stem from the inherent complexity of the Internet. The good news is that the &lt;code&gt;urllib.request&lt;/code&gt; module can help demystify much of this complexity.&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 Array: Working With Numeric Data Efficiently</title>
      <id>https://realpython.com/python-array/</id>
      <link href="https://realpython.com/python-array/"/>
      <updated>2024-01-01T14:00:00+00:00</updated>
      <summary>In this tutorial, you&#x27;ll dive deep into working with numeric arrays in Python, an efficient tool for handling binary data. Along the way, you&#x27;ll explore low-level data types exposed by the array module, emulate custom types, and even pass a Python array to C for high-performance processing.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;When you start your programming adventure, one of the most fundamental concepts that you encounter early on is the &lt;strong&gt;array&lt;/strong&gt;. If you’ve recently switched to Python from another programming language, then you might be surprised that arrays are nowhere to be found as a built-in syntactical construct in Python. Instead of arrays, you typically use &lt;strong&gt;lists&lt;/strong&gt;, which are slightly different and more flexible than classic arrays.&lt;/p&gt;
&lt;p&gt;That said, Python ships with the lesser-known &lt;code&gt;array&lt;/code&gt; module in its standard library, providing a specialized sequence type that can help you process &lt;strong&gt;binary data&lt;/strong&gt;. Because it’s not as widely used or well documented as other sequences, there are many misconceptions surrounding the use of the &lt;code&gt;array&lt;/code&gt; module. After reading this tutorial, you’ll have a clear idea of when to use Python’s &lt;code&gt;array&lt;/code&gt; module and the corresponding data type that it provides.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this tutorial, you’ll learn how to:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Create &lt;strong&gt;homogeneous arrays&lt;/strong&gt; of numbers in Python&lt;/li&gt;
&lt;li&gt;Modify &lt;strong&gt;numeric arrays&lt;/strong&gt; just like any other sequence&lt;/li&gt;
&lt;li&gt;Convert between arrays and other &lt;strong&gt;data types&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Choose the right &lt;strong&gt;type code&lt;/strong&gt; for Python arrays&lt;/li&gt;
&lt;li&gt;Emulate &lt;strong&gt;nonstandard types&lt;/strong&gt; in arrays&lt;/li&gt;
&lt;li&gt;Pass a Python array’s &lt;strong&gt;pointer&lt;/strong&gt; to a C function&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Before you dive in, you may want to brush up on your knowledge of manipulating Python sequences like &lt;a href=&quot;https://realpython.com/python-list/&quot;&gt;lists&lt;/a&gt; and &lt;a href=&quot;https://realpython.com/python-tuple/&quot;&gt;tuples&lt;/a&gt;, defining custom &lt;a href=&quot;https://realpython.com/python-classes/&quot;&gt;classes&lt;/a&gt; and &lt;a href=&quot;https://realpython.com/python-data-classes/&quot;&gt;data classes&lt;/a&gt;, and &lt;a href=&quot;https://realpython.com/working-with-files-in-python/&quot;&gt;working with files&lt;/a&gt;. Ideally, you should be familiar with &lt;a href=&quot;https://realpython.com/python-bitwise-operators/&quot;&gt;bitwise operators&lt;/a&gt; and be able to handle binary data in Python.&lt;/p&gt;
&lt;p&gt;You can download the complete source code and other resources mentioned in this tutorial by clicking the link below:&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown=&quot;1&quot;&gt;Get Your Code:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/python-array-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-python-array-code&quot; data-focus=&quot;false&quot; markdown=&quot;1&quot;&gt;Click here to download the free source code&lt;/a&gt; that shows you how to use Python’s &lt;code&gt;array&lt;/code&gt; with your numeric data.&lt;/p&gt;
&lt;/div&gt;
&lt;h2 id=&quot;understanding-arrays-in-programming&quot;&gt;Understanding Arrays in Programming&lt;a class=&quot;headerlink&quot; href=&quot;#understanding-arrays-in-programming&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Some developers treat arrays and Python’s lists as synonymous. Others argue that Python doesn’t have traditional arrays, as seen in languages like &lt;a href=&quot;https://realpython.com/c-for-python-programmers/&quot;&gt;C&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python-vs-cpp/&quot;&gt;C++&lt;/a&gt;, or &lt;a href=&quot;https://realpython.com/java-vs-python/&quot;&gt;Java&lt;/a&gt;. In this brief section, you’ll try to answer whether Python has arrays.&lt;/p&gt;
&lt;h3 id=&quot;arrays-in-computer-science&quot;&gt;Arrays in Computer Science&lt;a class=&quot;headerlink&quot; href=&quot;#arrays-in-computer-science&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;To understand arrays better, it helps to zoom out a bit and look at them through the lens of theory. This will clarify some baseline terminology, including:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Abstract data types&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Data structures&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Data types&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Computer science models collections of data as &lt;a href=&quot;https://en.wikipedia.org/wiki/Abstract_data_type&quot;&gt;abstract data types (ADTs)&lt;/a&gt; that support certain operations like insertion or deletion of elements. These operations must satisfy additional constraints that describe the abstract data type’s unique behaviors.&lt;/p&gt;
&lt;p&gt;The word &lt;em&gt;abstract&lt;/em&gt; in this context means these data types leave the implementation details up to you, only defining the expected semantics or the set of available operations that an ADT must support. As a result, you can often represent one abstract data type using a few alternative &lt;a href=&quot;https://en.wikipedia.org/wiki/Data_structure&quot;&gt;data structures&lt;/a&gt;, which are concrete implementations of the same conceptual approach to organizing data.&lt;/p&gt;
&lt;p&gt;Programming languages usually provide a few data structures in the form of built-in &lt;a href=&quot;https://en.wikipedia.org/wiki/Data_type&quot;&gt;data types&lt;/a&gt; as a convenience so that you don’t have to implement them yourself. This means you can focus on solving more abstract problems instead of starting from scratch every time. For example, the Python &lt;a href=&quot;https://realpython.com/python-dicts/&quot;&gt;&lt;code&gt;dict&lt;/code&gt;&lt;/a&gt; data type is a &lt;a href=&quot;https://en.wikipedia.org/wiki/Hash_table&quot;&gt;hash table&lt;/a&gt; data structure that implements the &lt;a href=&quot;https://en.wikipedia.org/wiki/Associative_array&quot;&gt;dictionary&lt;/a&gt; abstract data type.&lt;/p&gt;
&lt;p&gt;To reiterate the meaning of these terms, &lt;strong&gt;abstract data types&lt;/strong&gt; define the desired semantics, &lt;strong&gt;data structures&lt;/strong&gt; implement them, and &lt;strong&gt;data types&lt;/strong&gt; represent data structures in programming languages as built-in syntactic constructs.&lt;/p&gt;
&lt;p&gt;Some of the most common examples of abstract data types include these:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/python-hash-table/#hash-table-vs-dictionary&quot;&gt;Dictionaries&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/python-maze-solver/#install-the-networkx-library&quot;&gt;Graphs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/List_(abstract_data_type)&quot;&gt;Lists&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/queue-in-python/&quot;&gt;Queues&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/python-sets/&quot;&gt;Sets&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/how-to-implement-python-stack/&quot;&gt;Stacks&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Tree_(data_structure)&quot;&gt;Trees&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In some cases, you can build more specific kinds of abstract data types on top of existing ADTs by incorporating additional constraints. For instance, you can &lt;a href=&quot;https://realpython.com/queue-in-python/#building-a-stack-data-type&quot;&gt;build a stack&lt;/a&gt; by modifying the queue or the other way around.&lt;/p&gt;
&lt;p&gt;As you can see, the list of ADTs doesn’t include arrays. That’s because the array is a specific &lt;strong&gt;data structure&lt;/strong&gt; representing the list abstract data type. The list ADT dictates what operations the array must support and which behaviors it should exhibit. If you’ve worked with the Python &lt;code&gt;list&lt;/code&gt;, then you should already have a pretty good idea of what the list in computer science is all about.&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; Don’t confuse the list abstract data type in computer science with the &lt;code&gt;list&lt;/code&gt; data type in Python, which represents the former. Similarly, it’s easy to mistake the theoretical array data structure for a specific &lt;a href=&quot;https://en.wikipedia.org/wiki/Array_(data_type)&quot;&gt;array data type&lt;/a&gt;, which many programming languages provide as a convenient primitive type built into their syntax.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;The &lt;strong&gt;list abstract data type&lt;/strong&gt; is a linear collection of values forming an ordered sequence of elements. These elements follow a specific arrangement, meaning that each element has a position relative to the others, identified by a numeric index that usually starts at zero. The list has a variable but finite length. It may or may not contain values of different types, as well as duplicates.&lt;/p&gt;
&lt;p&gt;The interface of the list abstract data type resembles Python’s &lt;code&gt;list&lt;/code&gt;, typically including the following operations:&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;List ADT&lt;/th&gt;
&lt;th&gt;Python’s &lt;code&gt;list&lt;/code&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Get an element by an index&lt;/td&gt;
&lt;td&gt;&lt;code&gt;fruits[0]&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Set an element at a given index&lt;/td&gt;
&lt;td&gt;&lt;code&gt;fruits[0] = &quot;banana&quot;&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Insert an element at a given index&lt;/td&gt;
&lt;td&gt;&lt;code&gt;fruits.insert(0, &quot;banana&quot;)&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Delete an element by an index&lt;/td&gt;
&lt;td&gt;&lt;code&gt;fruits.pop(0)&lt;/code&gt;, &lt;code&gt;del fruits[0]&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Delete an element by a value&lt;/td&gt;
&lt;td&gt;&lt;code&gt;fruits.remove(&quot;banana&quot;)&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Delete all elements&lt;/td&gt;
&lt;td&gt;&lt;code&gt;fruits.clear()&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Find the index of a given element&lt;/td&gt;
&lt;td&gt;&lt;code&gt;fruits.index(&quot;banana&quot;)&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Append an element at the right end&lt;/td&gt;
&lt;td&gt;&lt;code&gt;fruits.append(&quot;banana&quot;)&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Merge with another list&lt;/td&gt;
&lt;td&gt;&lt;code&gt;fruits.extend(veggies)&lt;/code&gt;, &lt;code&gt;fruits + veggies&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sort elements&lt;/td&gt;
&lt;td&gt;&lt;code&gt;fruits.sort()&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Get the number of elements&lt;/td&gt;
&lt;td&gt;&lt;code&gt;len(fruits)&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Iterate over the elements&lt;/td&gt;
&lt;td&gt;&lt;code&gt;iter(fruits)&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Check if an element is present&lt;/td&gt;
&lt;td&gt;&lt;code&gt;&quot;banana&quot; in fruits&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;Now that you understand where the array data structure fits into the bigger picture, it’s time to take a closer look at it.&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python-array/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-array/ »&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 #185: 2023 Real Python Tutorial &amp; Video Course Wrap-Up</title>
      <id>https://realpython.com/podcasts/rpp/185/</id>
      <link href="https://realpython.com/podcasts/rpp/185/"/>
      <updated>2023-12-29T12:00:00+00:00</updated>
      <summary>Three members of the Real Python team are joining us this week: Kate Finegan, Tappan Moore, and Philipp Acsany. We wanted to share a year-end wrap-up with tutorials, step-by-step projects, code conversations, and video courses that showcase what our team created this year.</summary>
      <content type="html">
        &lt;p&gt;Three members of the Real Python team are joining us this week: Kate Finegan, Tappan Moore, and Philipp Acsany. We wanted to share a year-end wrap-up with tutorials, step-by-step projects, code conversations, and video courses that showcase what our team created this year.&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 #184: PyCoder&#x27;s Weekly 2023 Wrap Up</title>
      <id>https://realpython.com/podcasts/rpp/184/</id>
      <link href="https://realpython.com/podcasts/rpp/184/"/>
      <updated>2023-12-22T12:00:00+00:00</updated>
      <summary>It&#x27;s been a fascinating year for the Python language and community. PyCoder&#x27;s Weekly included over 1,500 links to articles, blog posts, tutorials, and projects in 2023. Christopher Trudeau is back on the show this week to help wrap up everything by sharing some highlights and Python trends from across the year.</summary>
      <content type="html">
        &lt;p&gt;It&#x27;s been a fascinating year for the Python language and community. PyCoder&#x27;s Weekly included over 1,500 links to articles, blog posts, tutorials, and projects in 2023. Christopher Trudeau is back on the show this week to help wrap up everything by sharing some highlights and Python trends from across the year.&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>Add Logging and Notification Messages to Flask Web Projects</title>
      <id>https://realpython.com/flask-logging-messages/</id>
      <link href="https://realpython.com/flask-logging-messages/"/>
      <updated>2023-12-20T14:00:00+00:00</updated>
      <summary>After you implement the main functionality of a web project, it&#x27;s good to understand how your users interact with your app and where they may run into errors. In this tutorial, you&#x27;ll enhance your Flask project by creating error pages and logging messages.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;After implementing the main functionality of a web project, you may find that your app is rough around the edges. Often, this boils down to the user experience (UX) of your project. For example, when you send a form, you don’t receive a success message, although everything worked fine. You want to build an immersive experience, but wrong URLs display unwelcoming error messages. Luckily, you can get valuable information from Flask through logging.&lt;/p&gt;
&lt;p&gt;As an admin of a web project, you may know how to navigate your app without running into errors. But looking at the messages that the server sends you, you may notice that not all users do. That’s when a more verbose logging system can give you insights.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this tutorial, you’ll learn how to:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Create &lt;strong&gt;error pages&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Improve the user experience with &lt;strong&gt;notification messages&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Gain information with &lt;strong&gt;logging&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Adding features like the ones listed above may keep your current functionality intact and enhance your web project with a better user experience that your visitors will love.&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/flask-logging-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-flask-logging-code&quot; data-focus=&quot;false&quot; markdown=&quot;1&quot;&gt;Click here to download the free source code&lt;/a&gt; that shows you how to add error pages and logging to your Flask app.&lt;/p&gt;
&lt;/div&gt;
&lt;h2 id=&quot;prerequisites&quot;&gt;Prerequisites&lt;a class=&quot;headerlink&quot; href=&quot;#prerequisites&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;You’ll gain the most value from this tutorial if you’ve already created one or more &lt;a href=&quot;https://realpython.com/flask-project/&quot;&gt;Flask web projects&lt;/a&gt; yourself. It’ll also be helpful if you’ve worked with &lt;a href=&quot;https://realpython.com/primer-on-jinja-templating/&quot;&gt;Jinja templating&lt;/a&gt; and &lt;a href=&quot;https://realpython.com/html-css-python/&quot;&gt;HTML and CSS&lt;/a&gt; before.&lt;/p&gt;
&lt;p&gt;Also, you should be comfortable using the &lt;a href=&quot;https://realpython.com/terminal-commands/&quot;&gt;terminal&lt;/a&gt; and have &lt;a href=&quot;https://realpython.com/products/python-basics-book/&quot;&gt;basic knowledge&lt;/a&gt; of Python. Although it helps to know about &lt;a href=&quot;https://realpython.com/python-virtual-environments-a-primer/&quot;&gt;virtual environments&lt;/a&gt; and &lt;a href=&quot;https://realpython.com/what-is-pip/&quot;&gt;&lt;code&gt;pip&lt;/code&gt;&lt;/a&gt;, you’ll learn how to set everything up as you work through the tutorial.&lt;/p&gt;
&lt;h2 id=&quot;project-overview&quot;&gt;Project Overview&lt;a class=&quot;headerlink&quot; href=&quot;#project-overview&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;In this tutorial, you’ll continue to work on an existing Flask project. The project at hand is a public message board.&lt;/p&gt;
&lt;p&gt;You’ll start with an existing Flask project and then implement logging and notification messages:&lt;/p&gt;
&lt;figure&gt;
  &lt;div class=&quot;embed-responsive embed-responsive-16by9 rounded mb-3 border&quot;&gt;
    &lt;iframe loading=&quot;lazy&quot; class=&quot;embed-responsive-item&quot; src=&quot;https://player.vimeo.com/video/892852624?background=1&quot; frameborder=&quot;0&quot; allow=&quot;fullscreen&quot; allowfullscreen&gt;&lt;/iframe&gt;
  &lt;/div&gt;

&lt;/figure&gt;

&lt;p&gt;The demo video above shows the Flask project on the left and the terminal with server logs on the right. When you interact with the web app, you get helpful feedback with notification messages. As an admin, you can also see the info messages in your logs to help you understand how your users interact with your app.&lt;/p&gt;
&lt;p&gt;In the next step, you’ll download the source code of the &lt;a href=&quot;https://realpython.com/flask-database/&quot;&gt;Flask project&lt;/a&gt;. However, you’ll notice that the codebase is quite generic so that you can transfer the instructions of this tutorial into your own Flask project.&lt;/p&gt;
&lt;h2 id=&quot;get-started&quot;&gt;Get Started&lt;a class=&quot;headerlink&quot; href=&quot;#get-started&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;In this section, you’ll download all the requirements that you need for this tutorial and set up the development environment.
Generally, you can leverage this tutorial to expand any Flask project that you’re currently working on.
However, if you want to follow along closely, then you should perform the steps outlined below.&lt;/p&gt;
&lt;h3 id=&quot;grab-the-prerequisites&quot;&gt;Grab the Prerequisites&lt;a class=&quot;headerlink&quot; href=&quot;#grab-the-prerequisites&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;To hit the ground running, you’ll build up on an existing &lt;a href=&quot;https://realpython.com/flask-database/&quot;&gt;Flask project with a database&lt;/a&gt;.
That way, you don’t need to create a Flask project from scratch. Instead, you can focus on the main objectives of this tutorial, like adding an error page and displaying helpful messages to your users.&lt;/p&gt;
&lt;p&gt;The code that you need is already in place for you. All you need to do is download the source code 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/flask-logging-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-flask-logging-code&quot; data-focus=&quot;false&quot; markdown=&quot;1&quot;&gt;Click here to download the free source code&lt;/a&gt; that shows you how to add error pages and logging to your Flask app.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Alternatively, you can follow the &lt;a href=&quot;https://realpython.com/flask-database/&quot;&gt;Flask project with a database&lt;/a&gt; tutorial. Either way, you should end up with a folder structure that looks like this:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;rp_flask_board/
├── board/
│   │
│   ├── static/
│   │   └── styles.css
│   │
│   ├── templates/
│   │   │
│   │   ├── pages/
│   │   │   ├── about.html
│   │   │   └── home.html
│   │   │
│   │   ├── posts/
│   │   │   ├── create.html
│   │   │   └── posts.html
│   │   │
│   │   ├── _navigation.html
│   │   └── base.html
│   │
│   ├── __init__.py
│   ├── database.py
│   ├── pages.py
│   ├── posts.py
│   └── schema.sql
│
└── board.sqlite
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Once you’ve got the folder structure for your Flask project in place, you can read on to prepare the development environment that you’ll need to work on your web app.&lt;/p&gt;
&lt;h3 id=&quot;prepare-your-development-environment&quot;&gt;Prepare Your Development Environment&lt;a class=&quot;headerlink&quot; href=&quot;#prepare-your-development-environment&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/flask-logging-messages/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/flask-logging-messages/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Python Basics Exercises: Reading and Writing Files</title>
      <id>https://realpython.com/courses/python-exercises-reading-writing-files/</id>
      <link href="https://realpython.com/courses/python-exercises-reading-writing-files/"/>
      <updated>2023-12-19T14:00:00+00:00</updated>
      <summary>In this video tutorial, you&#x27;ll practice transferring data between your Python programs and external software by reading and writing files. Through exercises, you&#x27;ll master the art of reading and writing information saved in CSV file format, which is extensively used for exchanging tabular data.</summary>
      <content type="html">
        &lt;p&gt;Files play a key role in computing, as they store and transfer data. You likely come across numerous files on a daily basis. In &lt;a href=&quot;https://realpython.com/courses/python-reading-and-writing-files/&quot;&gt;Python Basics: Reading and Writing Files&lt;/a&gt;, you dove into the world of file manipulation using Python.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this video course, you&amp;rsquo;ll practice:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Differentiating between &lt;strong&gt;text&lt;/strong&gt; and &lt;strong&gt;binary&lt;/strong&gt; files&lt;/li&gt;
&lt;li&gt;Using &lt;strong&gt;character encodings&lt;/strong&gt; and &lt;strong&gt;line endings&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Manipulating &lt;strong&gt;file objects&lt;/strong&gt; in Python&lt;/li&gt;
&lt;li&gt;Reading and writing character data with different &lt;strong&gt;file modes&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Using &lt;code&gt;open()&lt;/code&gt;, &lt;code&gt;Path.open()&lt;/code&gt;, and the &lt;code&gt;with&lt;/code&gt; statement&lt;/li&gt;
&lt;li&gt;Leveraging the &lt;code&gt;csv&lt;/code&gt; module to manipulate &lt;strong&gt;CSV data&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This video course is part of the Python Basics series, which is complements the book &lt;a href=&quot;https://realpython.com/products/python-basics-book/&quot;&gt;&lt;em&gt;Python Basics: A Practical Introduction to Python 3&lt;/em&gt;&lt;/a&gt;. Additionally, you can explore other &lt;a href=&quot;https://realpython.com/learning-paths/python-basics/&quot;&gt;Python Basics courses&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Please note that throughout this course, you&amp;rsquo;ll be using &lt;a href=&quot;https://realpython.com/python-idle/&quot;&gt;IDLE&lt;/a&gt; to &lt;a href=&quot;https://realpython.com/interacting-with-python/&quot;&gt;interact with Python&lt;/a&gt;. If you&amp;rsquo;re new to Python, then you might want to check out &lt;a href=&quot;https://realpython.com/courses/setting-up-python/&quot;&gt;Python Basics: Setting Up Python&lt;/a&gt; before diving into this course.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Enhance Your Flask Web Project With a Database</title>
      <id>https://realpython.com/flask-database/</id>
      <link href="https://realpython.com/flask-database/"/>
      <updated>2023-12-18T14:00:00+00:00</updated>
      <summary>Adding a database to your Flask project elevates your web app to the next level. In this tutorial, you&#x27;ll learn how to connect your Flask app to a database and how to receive and store posts from users.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Adding a database to your Flask project comes with many advantages.
By connecting a database, you’ll be able to store user information, monitor user interactions, and maintain dynamic site content.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this tutorial, you’ll learn how to:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Hide secrets in &lt;strong&gt;environment variables&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Formulate your database structure with &lt;strong&gt;models&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Connect your Flask app with a &lt;strong&gt;database&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Receive data from users with &lt;strong&gt;forms&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;By the end of this tutorial, you’ll have a robust understanding of how to connect your Flask app to a database and how to leverage this connection to expand your project’s capabilities.&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/flask-database-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-flask-database-code&quot; data-focus=&quot;false&quot; markdown=&quot;1&quot;&gt;Click here to download the free source code&lt;/a&gt; for connecting a database to your Flask project.&lt;/p&gt;
&lt;/div&gt;
&lt;h2 id=&quot;prerequisites&quot;&gt;Prerequisites&lt;a class=&quot;headerlink&quot; href=&quot;#prerequisites&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;You’ll gain the most value from this tutorial if you’ve already created one or more &lt;a href=&quot;https://realpython.com/flask-project/&quot;&gt;Flask web projects&lt;/a&gt; yourself.&lt;/p&gt;
&lt;p&gt;Also, you should be comfortable using the &lt;a href=&quot;https://realpython.com/terminal-commands/&quot;&gt;terminal&lt;/a&gt; and have &lt;a href=&quot;https://realpython.com/products/python-basics-book/&quot;&gt;basic knowledge&lt;/a&gt; of Python. Although it helps to know about &lt;a href=&quot;https://realpython.com/python-virtual-environments-a-primer/&quot;&gt;virtual environments&lt;/a&gt; and &lt;a href=&quot;https://realpython.com/what-is-pip/&quot;&gt;&lt;code&gt;pip&lt;/code&gt;&lt;/a&gt;, you’ll learn how to set everything up as you work through the tutorial.&lt;/p&gt;
&lt;h2 id=&quot;project-overview&quot;&gt;Project Overview&lt;a class=&quot;headerlink&quot; href=&quot;#project-overview&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;In this tutorial, you’ll continue to work on an existing Flask project. The project at hand is a public message board.&lt;/p&gt;
&lt;p&gt;You’ll start with an existing Flask project and then implement forms and a database. In the end, you can post and save messages:&lt;/p&gt;
&lt;figure&gt;
  &lt;div class=&quot;embed-responsive embed-responsive-16by9 rounded mb-3 border&quot;&gt;
    &lt;iframe loading=&quot;lazy&quot; class=&quot;embed-responsive-item&quot; src=&quot;https://player.vimeo.com/video/892852608?background=1&quot; frameborder=&quot;0&quot; allow=&quot;fullscreen&quot; allowfullscreen&gt;&lt;/iframe&gt;
  &lt;/div&gt;

&lt;/figure&gt;

&lt;p&gt;In the demo video above, you get an impression of how you can interact with the message board. However, the functionality is very similar to other interactions with a web app. If you feel inspired to adjust the project to your needs, then this Flask project is the perfect starting ground for that.&lt;/p&gt;
&lt;p&gt;In the next step, you’ll download the source code of the &lt;a href=&quot;https://realpython.com/flask-project/&quot;&gt;Flask boilerplate project&lt;/a&gt;. However, you’ll notice that the codebase is quite generic so that you can transfer the instructions of this tutorial into your own Flask project.&lt;/p&gt;
&lt;h2 id=&quot;get-started&quot;&gt;Get Started&lt;a class=&quot;headerlink&quot; href=&quot;#get-started&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;In this section, you’ll download all the requirements that you need for this tutorial and set up the development environment.
Generally, you can leverage this tutorial to expand any Flask project that you’re currently working on.
However, if you want to follow along closely, then you should perform the steps outlined below.&lt;/p&gt;
&lt;h3 id=&quot;grab-the-prerequisites&quot;&gt;Grab the Prerequisites&lt;a class=&quot;headerlink&quot; href=&quot;#grab-the-prerequisites&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;To hit the ground running, you’ll build upon an existing &lt;a href=&quot;https://realpython.com/flask-project/&quot;&gt;Flask boilerplate project&lt;/a&gt;.
That way, you don’t need to create a Flask project from scratch. Instead, you can focus on the main objectives of this tutorial, like adding a database and working with forms.&lt;/p&gt;
&lt;p&gt;The code that you need is already in place for you. All you need to do is download the source code 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/flask-database-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-flask-database-code&quot; data-focus=&quot;false&quot; markdown=&quot;1&quot;&gt;Click here to download the free source code&lt;/a&gt; for connecting a database to your Flask project.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Alternatively, you can follow the &lt;a href=&quot;https://realpython.com/flask-project/&quot;&gt;Flask boilerplate project&lt;/a&gt; tutorial. Either way, you should end up with a folder structure that looks like this:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;rp_flask_board/
│
└── board/
    │
    ├── static/
    │   └── styles.css
    │
    ├── templates/
    │   │
    │   ├── pages/
    │   │   ├── about.html
    │   │   └── home.html
    │   │
    │   ├── _navigation.html
    │   └── base.html
    │
    ├── __init__.py
    └── pages.py
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Once you’ve got the folder structure for your Flask project in place, you can read on to prepare the development environment that you’ll need to work on your web app.&lt;/p&gt;
&lt;h3 id=&quot;prepare-your-development-environment&quot;&gt;Prepare Your Development Environment&lt;a class=&quot;headerlink&quot; href=&quot;#prepare-your-development-environment&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Before you continue working on your Flask project, it’s a good idea to create and activate a &lt;a href=&quot;https://realpython.com/python-virtual-environments-a-primer/&quot;&gt;virtual environment&lt;/a&gt;. That way, you’re installing any project dependencies not system-wide but only in your project’s virtual environment.&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/flask-database/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/flask-database/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Build a Scalable Flask Web Project From Scratch</title>
      <id>https://realpython.com/flask-project/</id>
      <link href="https://realpython.com/flask-project/"/>
      <updated>2023-12-13T14:00:00+00:00</updated>
      <summary>In this tutorial, you&#x27;ll explore the process of creating a boilerplate for a Flask web project. It&#x27;s a great starting point for any scalable Flask web app that you wish to develop in the future, from basic web pages to complex web applications.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Flask is a powerful and flexible micro web framework for Python, ideal for both small and large web projects. It provides a straightforward way to get a web application up and running, with all the features that you need to get started.&lt;/p&gt;
&lt;p&gt;Over the course of this tutorial, you’ll explore the process of creating a boilerplate for a Flask web project. This boilerplate will serve as a great starting point for any scalable Flask web app that you wish to develop in the future, from basic web pages to complex web applications.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this tutorial, you’ll learn how to:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Set up a &lt;strong&gt;Flask project&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Create a &lt;code&gt;&quot;Hello, World!&quot;&lt;/code&gt; &lt;strong&gt;Flask app&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Add &lt;strong&gt;multiple pages&lt;/strong&gt; with blueprints&lt;/li&gt;
&lt;li&gt;Leverage &lt;strong&gt;Jinja templates&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Store &lt;strong&gt;static files&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;At the end of this tutorial, you’ll have created a working Flask web application that you can use to bootstrap your future Flask projects.&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/flask-project-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-flask-project-code&quot; data-focus=&quot;false&quot; markdown=&quot;1&quot;&gt;Click here to download the free source code&lt;/a&gt; that shows you how to build a Flask project boilerplate.&lt;/p&gt;
&lt;/div&gt;
&lt;h2 id=&quot;prerequisites&quot;&gt;Prerequisites&lt;a class=&quot;headerlink&quot; href=&quot;#prerequisites&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;You don’t need any previous knowledge of Flask to complete this project. If you want to learn more about the topics that you encounter in this tutorial, then you’ll find links to resources along the way.&lt;/p&gt;
&lt;p&gt;However, you should be comfortable using the &lt;a href=&quot;https://realpython.com/terminal-commands/&quot;&gt;terminal&lt;/a&gt; and have &lt;a href=&quot;https://realpython.com/products/python-basics-book/&quot;&gt;basic knowledge&lt;/a&gt; of Python. Although it helps to know about &lt;a href=&quot;https://realpython.com/python-virtual-environments-a-primer/&quot;&gt;virtual environments&lt;/a&gt; and &lt;a href=&quot;https://realpython.com/what-is-pip/&quot;&gt;&lt;code&gt;pip&lt;/code&gt;&lt;/a&gt;, you’ll learn how to set everything up as you work through the tutorial.&lt;/p&gt;
&lt;h2 id=&quot;project-overview&quot;&gt;Project Overview&lt;a class=&quot;headerlink&quot; href=&quot;#project-overview&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;In this tutorial, you’ll start building a Flask project, which could become a public message board at some point.
Here’s what the project will look at the end of this tutorial:&lt;/p&gt;
&lt;figure&gt;
  &lt;div class=&quot;embed-responsive embed-responsive-16by9 rounded mb-3 border&quot;&gt;
    &lt;iframe loading=&quot;lazy&quot; class=&quot;embed-responsive-item&quot; src=&quot;https://player.vimeo.com/video/892852597?background=1&quot; frameborder=&quot;0&quot; allow=&quot;fullscreen&quot; allowfullscreen&gt;&lt;/iframe&gt;
  &lt;/div&gt;

&lt;/figure&gt;

&lt;p&gt;You create a basic Flask project with two pages that inherit content and style from a parent template.&lt;/p&gt;
&lt;p&gt;The Flask project that you’ll build in this tutorial will be very generic.
That way, it’s the perfect base for any of your future projects. For example, maybe you’ll want to &lt;a href=&quot;https://realpython.com/flask-database/&quot;&gt;add a database&lt;/a&gt; or implement &lt;a href=&quot;https://realpython.com/flask-logging-messages/&quot;&gt;logging and notification messages&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;get-started&quot;&gt;Get Started&lt;a class=&quot;headerlink&quot; href=&quot;#get-started&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;In this section, you’ll prepare the development environment for your Flask project. First, you’ll create a &lt;strong&gt;virtual environment&lt;/strong&gt; and install all the &lt;strong&gt;dependencies&lt;/strong&gt; that you need for your project.&lt;/p&gt;
&lt;h3 id=&quot;create-a-virtual-environment&quot;&gt;Create a Virtual Environment&lt;a class=&quot;headerlink&quot; href=&quot;#create-a-virtual-environment&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;In this section, you’ll build your project structure. You can name the root folder of your project any way you like. For example, you could name it &lt;code&gt;rp_flask_board/&lt;/code&gt; if your ultimate goal is to create a message board. If you have another project in mind, then feel free to name your folder accordingly. Create your folder and navigate into it:&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;&gt;&lt;span class=&quot;icon baseline js-codeblock-output-on codeblock__header--icon-lower&quot;&gt;&lt;svg&gt;&lt;use href=&quot;/static/icons.55e8f03acfe3.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;mkdir&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;rp_flask_board
&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;cd&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;rp_flask_board
&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;&gt;&lt;svg&gt;&lt;use href=&quot;/static/icons.55e8f03acfe3.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;&gt;&lt;svg&gt;&lt;use href=&quot;/static/icons.55e8f03acfe3.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 case, you name the root folder of your project &lt;code&gt;rp_flask_board/&lt;/code&gt;. The files and folders that you create over the course of this series will be located in either this folder or its subfolders.&lt;/p&gt;
&lt;p&gt;After you navigate to the project folder, it’s a good idea to create and activate a &lt;a href=&quot;https://realpython.com/python-virtual-environments-a-primer/&quot;&gt;virtual environment&lt;/a&gt;. That way, you’re installing any project dependencies not system-wide but only in your project’s virtual environment.&lt;/p&gt;
&lt;p&gt;Select your &lt;strong&gt;operating system&lt;/strong&gt; below and use your platform-specific command to set up a virtual environment:&lt;/p&gt;
&lt;ul class=&quot;nav nav-tabs justify-content-end js-platform-widget-tabs&quot; role=&quot;tablist&quot;&gt;

  &lt;li class=&quot;nav-item mb-0 js-platform-widget-tab-windows&quot; role=&quot;presentation&quot;&gt;
    &lt;a class=&quot;nav-link link-unstyled text-body active small&quot; id=&quot;windows-tab-1&quot; data-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;&gt;&lt;svg&gt;&lt;use href=&quot;/static/icons.55e8f03acfe3.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;&gt;&lt;svg&gt;&lt;use href=&quot;/static/icons.55e8f03acfe3.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;&gt;&lt;svg&gt;&lt;use href=&quot;/static/icons.55e8f03acfe3.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;&gt;&lt;span class=&quot;icon baseline js-codeblock-output-on codeblock__header--icon-lower&quot;&gt;&lt;svg&gt;&lt;use href=&quot;/static/icons.55e8f03acfe3.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;p&quot;&gt;.\&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;venv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;\&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Scripts&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;\&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;activate&lt;/span&gt;
&lt;span class=&quot;gp gp-VirtualEnv&quot;&gt;(venv)&lt;/span&gt; &lt;span class=&quot;gp&quot;&gt;PS&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot;&gt;&lt;span class=&quot;icon baseline&quot;&gt;&lt;svg&gt;&lt;use href=&quot;/static/icons.55e8f03acfe3.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;&gt;&lt;svg&gt;&lt;use href=&quot;/static/icons.55e8f03acfe3.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;&gt;&lt;span class=&quot;icon baseline js-codeblock-output-on codeblock__header--icon-lower&quot;&gt;&lt;svg&gt;&lt;use href=&quot;/static/icons.55e8f03acfe3.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;
&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;&gt;&lt;svg&gt;&lt;use href=&quot;/static/icons.55e8f03acfe3.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;&gt;&lt;svg&gt;&lt;use href=&quot;/static/icons.55e8f03acfe3.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;With the commands shown above, you create and activate a virtual environment named &lt;code&gt;venv&lt;/code&gt; by using Python’s built-in &lt;code&gt;venv&lt;/code&gt; module. The parenthesized &lt;code&gt;(venv)&lt;/code&gt; in front of the prompt indicates that you’ve successfully activated the virtual environment.&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/flask-project/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/flask-project/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Python Basics Exercises: Strings and String Methods</title>
      <id>https://realpython.com/courses/python-exercises-string-methods/</id>
      <link href="https://realpython.com/courses/python-exercises-string-methods/"/>
      <updated>2023-12-12T14:00:00+00:00</updated>
      <summary>In this Python Basics Exercises course, you&#x27;ll review how to work with the string data type. You&#x27;ll practice manipulating strings with methods and formatting them for printing.</summary>
      <content type="html">
        &lt;p&gt;In &lt;a href=&quot;https://realpython.com/courses/python-basics-strings-string-methods/&quot;&gt;Python Basics: Strings and String Methods&lt;/a&gt;,
you used &lt;strong&gt;strings&lt;/strong&gt; for text data in Python. You also learned how to manipulate strings with &lt;strong&gt;string methods&lt;/strong&gt;.
For example, you changed strings from lowercase to uppercase, 
removed whitespace from the beginning or end of a string, and replaced
parts of a string with different text.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this video course, you&amp;rsquo;ll practice:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Manipulating strings with &lt;strong&gt;string methods&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Working with &lt;strong&gt;user input&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Dealing with strings of &lt;strong&gt;numbers&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Formatting&lt;/strong&gt; strings for printing&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This video course is part of the Python Basics series, which accompanies &lt;a href=&quot;https://realpython.com/products/python-basics-book/&quot;&gt;&lt;em&gt;Python Basics: A Practical Introduction to Python 3&lt;/em&gt;&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;Note that you&amp;rsquo;ll be using &lt;a href=&quot;https://realpython.com/python-idle/&quot;&gt;IDLE&lt;/a&gt; to &lt;a href=&quot;https://realpython.com/interacting-with-python/&quot;&gt;interact with Python&lt;/a&gt; throughout this course. If you&amp;rsquo;re just getting started, then you might want to check out &lt;a href=&quot;https://realpython.com/courses/setting-up-python/&quot;&gt;Python Basics: Setting Up Python&lt;/a&gt; before diving into this course.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Python News: What&#x27;s New From November 2023</title>
      <id>https://realpython.com/python-news-november-2023/</id>
      <link href="https://realpython.com/python-news-november-2023/"/>
      <updated>2023-12-11T14:00:00+00:00</updated>
      <summary>November 2023 was a busy month for Python, with PyPI&#x27;s first security audit and new versions of Pydantic and PyScript. There&#x27;s also still time to submit a proposal to PyCon US and to participate in the annual Python Developers Survey.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;November brought exciting news to the Python community, from PyPI’s first &lt;strong&gt;security audit&lt;/strong&gt; to a new version of &lt;strong&gt;PyScript&lt;/strong&gt;! The month also gave Python developers like you ample opportunities to get involved in the ecosystem through the annual &lt;strong&gt;Python Developers Survey&lt;/strong&gt; and the &lt;strong&gt;PyCon US&lt;/strong&gt; call for proposals. Development has also continued on &lt;strong&gt;Python 3.13&lt;/strong&gt; and &lt;strong&gt;Pydantic&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Get ready to explore the recent highlights!&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;pypi-completes-first-security-audit&quot;&gt;PyPI Completes First Security Audit&lt;a class=&quot;headerlink&quot; href=&quot;#pypi-completes-first-security-audit&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;With the support of the &lt;a href=&quot;https://www.opentech.fund/&quot;&gt;Open Technology Fund (OTF)&lt;/a&gt;, the &lt;a href=&quot;https://pypi.org/&quot;&gt;Python Package Index (PyPI)&lt;/a&gt; completed its &lt;a href=&quot;https://blog.pypi.org/posts/2023-11-14-1-pypi-completes-first-security-audit/&quot;&gt;first external security audit&lt;/a&gt; in November. Because PyPI is the official index and repository for the Python ecosystem, maintaining its security is of vital importance for the community at large.&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; PyPI has been doing a lot to boost security recently, including hiring a safety and security engineer. You can hear from him on &lt;a href=&quot;https://realpython.com/podcasts/rpp/177/&quot;&gt;The Real Python Podcast Episode 177: Welcoming PyPI’s Safety &amp;amp; Security Engineer Mike Fiedler&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;The audit began in late summer 2023 and involved searching for security vulnerabilities in &lt;a href=&quot;https://github.com/pypi/warehouse&quot;&gt;Warehouse&lt;/a&gt; and &lt;a href=&quot;https://github.com/cabotage/cabotage-app&quot;&gt;cabotage&lt;/a&gt;, the codebases that power and deploy PyPI. &lt;a href=&quot;https://www.trailofbits.com/&quot;&gt;Trail of Bits&lt;/a&gt;, a security firm with significant open-source and Python experience, performed the audit.&lt;/p&gt;
&lt;p&gt;Overall, the auditors didn’t identify any high-severity issues in either of the codebases, which is great news. The audit did flag some issues, like weak signature verification, unintentional information leaks, and weak cryptographic hashes, but but ultimately noted that the codebases demonstrated best practices in the industry. The PyPI team has already made the repository safer by working to remediate the risks that came up in the audit.&lt;/p&gt;
&lt;p&gt;If you’d like to learn more about how Trail of Bits conducted the audit and what the team found, then check out &lt;a href=&quot;https://blog.trailofbits.com/2023/11/14/our-audit-of-pypi/&quot;&gt;the blog post&lt;/a&gt; on the audit. You can also read the &lt;a href=&quot;https://github.com/trailofbits/publications#technology-product-reviews&quot;&gt;full report&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;python-3130a2-released&quot;&gt;Python 3.13.0a2 Released&lt;a class=&quot;headerlink&quot; href=&quot;#python-3130a2-released&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Just over a month ago, Python 3.12 introduced a ton of &lt;a href=&quot;https://realpython.com/python312-new-features/&quot;&gt;cool new features&lt;/a&gt;. But work never stops, and now the second alpha version of &lt;a href=&quot;https://discuss.python.org/t/python-3-13-0-alpha-2/39379&quot;&gt;Python 3.13&lt;/a&gt; is available.&lt;/p&gt;
&lt;div class=&quot;alert alert-primary&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; This is an alpha release, which isn’t intended for production environments. Instead, alpha versions are useful for testing features and fixing bugs.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;The most notable change for this release, compared to 3.12, is the elimination of many modules. Python 3.13 closes out a &lt;a href=&quot;https://peps.python.org/pep-0594/#deprecation-schedule&quot;&gt;deprecation schedule&lt;/a&gt; that began in &lt;a href=&quot;https://realpython.com/python311-new-features/&quot;&gt;Python 3.11&lt;/a&gt; with &lt;a href=&quot;https://peps.python.org/pep-0594/&quot;&gt;PEP 594&lt;/a&gt;. If you’ve been using these &lt;a href=&quot;https://peps.python.org/pep-0594/#deprecated-modules&quot;&gt;deprecated modules&lt;/a&gt; on newer Python versions, then you’ve likely run into a &lt;code&gt;DeprecationWarning&lt;/code&gt;. Some of the modules eliminated are &lt;code&gt;aifc&lt;/code&gt;, &lt;code&gt;audioop&lt;/code&gt;, &lt;code&gt;cgi&lt;/code&gt;, &lt;code&gt;cgitb&lt;/code&gt;, &lt;code&gt;crypt&lt;/code&gt;, &lt;code&gt;pipes&lt;/code&gt;, &lt;code&gt;telnetlib&lt;/code&gt;, and &lt;code&gt;lib2to3&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;But Python 3.13 isn’t just about deprecation. It also adds improvements to some modules. Here are a few examples:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;In &lt;a href=&quot;https://realpython.com/async-io-python/&quot;&gt;&lt;code&gt;asyncio&lt;/code&gt;&lt;/a&gt;, the &lt;code&gt;asyncio.loop.create_unix_server()&lt;/code&gt; method will now automatically remove the Unix &lt;a href=&quot;https://realpython.com/python-sockets/&quot;&gt;socket&lt;/a&gt; when the connection to the server is closed, which means you won’t have an unnecessary socket file hanging around on disk. &lt;/li&gt;
&lt;li&gt;In the &lt;code&gt;copy&lt;/code&gt; module, &lt;code&gt;copy.replace()&lt;/code&gt; makes working with &lt;a href=&quot;https://realpython.com/python-mutable-vs-immutable-types/&quot;&gt;immutable&lt;/a&gt; objects more convenient by allowing you to create a modified copy. &lt;/li&gt;
&lt;li&gt;In the &lt;code&gt;ipaddress&lt;/code&gt; module, the new &lt;code&gt;ipaddress.IPV4Address.ipv6_mapped&lt;/code&gt; property lets you represent an IPv4 address as an IPv6 address.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This is just a small sampling of the new functionality added to this version. To see the full list of removals, deprecations, additions, and improvements in 3.13.0a2, check out &lt;a href=&quot;https://docs.python.org/dev/whatsnew/3.13.html&quot;&gt;What’s New In Python 3.13&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python-news-november-2023/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-news-november-2023/ »&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 #183: Exploring Code Reviews in Python and Automating the Process</title>
      <id>https://realpython.com/podcasts/rpp/183/</id>
      <link href="https://realpython.com/podcasts/rpp/183/"/>
      <updated>2023-12-08T12:00:00+00:00</updated>
      <summary>What goes into a code review in Python? Is there a difference in how a large organization practices code review compared to a smaller one? What do you do if you&#x27;re a solo developer? This week on the show, Brendan Maginnis and Nick Thapen from Sourcery return to talk about code review and automated code assistance.</summary>
      <content type="html">
        &lt;p&gt;What goes into a code review in Python? Is there a difference in how a large organization practices code review compared to a smaller one? What do you do if you&#x27;re a solo developer? This week on the show, Brendan Maginnis and Nick Thapen from Sourcery return to talk about code review and automated code assistance.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Build a Hangman Game With Python and PySimpleGUI</title>
      <id>https://realpython.com/hangman-python-pysimplegui/</id>
      <link href="https://realpython.com/hangman-python-pysimplegui/"/>
      <updated>2023-12-06T14:00:00+00:00</updated>
      <summary>In this step-by-step tutorial, you&#x27;ll learn how to write the game of hangman in Python with a PySimpleGUI-based interface. You&#x27;ll see how to structure the game, build its GUI, and program the game&#x27;s logic and rules.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Wouldn’t it be cool to build a &lt;a href=&quot;https://en.wikipedia.org/wiki/Hangman_(game)&quot;&gt;hangman&lt;/a&gt; game with a nice graphical user interface (GUI) in Python? Maybe you’ve built a text-based user interface version of &lt;a href=&quot;https://realpython.com/python-hangman/&quot;&gt;hangman&lt;/a&gt;, and now you want to make an even more attractive game. For you as a Python programmer, building a GUI version of this game can be a rewarding challenge that can take you to the next skill level.&lt;/p&gt;
&lt;p&gt;Throughout this tutorial, you’ll build the hangman game in Python in a series of steps. The game will have a neat graphical interface based on the PySimpleGUI library.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this tutorial, you’ll:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Create a &lt;strong&gt;GUI&lt;/strong&gt; for your hangman game using &lt;strong&gt;PySimpleGUI&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Implement the &lt;strong&gt;logic&lt;/strong&gt; for the hangman game&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Connect&lt;/strong&gt; the game’s logic with its GUI layer&lt;/li&gt;
&lt;li&gt;Handle the &lt;strong&gt;game results&lt;/strong&gt; and provide other options&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To get the most from this tutorial, you should be comfortable with general Python programming, including how to &lt;a href=&quot;https://realpython.com/python-application-layouts/&quot;&gt;lay out a project&lt;/a&gt;. You should also have some experience working with &lt;a href=&quot;https://realpython.com/python-pyqt-gui-calculator/&quot;&gt;graphical user interfaces&lt;/a&gt;, especially those based on &lt;a href=&quot;https://realpython.com/pysimplegui-python/&quot;&gt;PySimpleGUI&lt;/a&gt;. You don’t need to have any previous knowledge about &lt;a href=&quot;https://realpython.com/pygame-a-primer/&quot;&gt;game&lt;/a&gt; programming, but it would be a plus.&lt;/p&gt;
&lt;p&gt;All the code that you’ll write in this tutorial is available for download. You can get it 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/hangman-python-pysimplegui-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-hangman-python-pysimplegui-code&quot; data-focus=&quot;false&quot; markdown=&quot;1&quot;&gt;Click here to download the free Python source code&lt;/a&gt; for your PySimpleGUI hangman game.&lt;/p&gt;
&lt;/div&gt;
&lt;h2 id=&quot;demo-hangman-with-python-and-pysimplegui&quot;&gt;Demo: Hangman With Python and PySimpleGUI&lt;a class=&quot;headerlink&quot; href=&quot;#demo-hangman-with-python-and-pysimplegui&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;In this tutorial, you’ll write an implementation of hangman using Python and PySimpleGUI. Once you’ve run all the steps to build the game, then you’ll end up with a &lt;a href=&quot;https://en.wikipedia.org/wiki/Graphical_user_interface&quot;&gt;graphical user interface (GUI)&lt;/a&gt; that will work something like the following:&lt;/p&gt;
&lt;figure&gt;
  &lt;div class=&quot;embed-responsive embed-responsive-16by9 rounded mb-3 &quot;&gt;
    &lt;iframe loading=&quot;lazy&quot; class=&quot;embed-responsive-item&quot; src=&quot;https://player.vimeo.com/video/885183317?background=1&quot; frameborder=&quot;0&quot; allow=&quot;fullscreen&quot; allowfullscreen&gt;&lt;/iframe&gt;
  &lt;/div&gt;

&lt;/figure&gt;

&lt;p&gt;In this tutorial, you’ll run through several challenges designed to help you solve specific game-related problems. Ultimately, you’ll have a hangman game that works like the demo above.&lt;/p&gt;
&lt;h2 id=&quot;project-overview&quot;&gt;Project Overview&lt;a class=&quot;headerlink&quot; href=&quot;#project-overview&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;When creating a GUI version of hangman, you’ll use a GUI framework that can handle a text-based game like hangman while still providing the ability to draw a hanged man. There are several good GUI engines available for Python. While you can use any of them to good effect, you’ll rely on PySimpleGUI in this tutorial.&lt;/p&gt;
&lt;p&gt;PySimpleGUI is a wrapper around several well-known GUI frameworks and libraries, such as &lt;a href=&quot;https://realpython.com/python-gui-tkinter/&quot;&gt;Tkinter&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python-gui-with-wxpython/&quot;&gt;wxPython&lt;/a&gt;, and &lt;a href=&quot;https://realpython.com/python-pyqt-gui-calculator/&quot;&gt;PyQt&lt;/a&gt;. It allows you to design a GUI as data. You’ll use the &lt;a href=&quot;https://pypi.python.org/pypi/PySimpleGUI/&quot;&gt;Tkinter wrapper&lt;/a&gt; in this tutorial, but you can explore the &lt;a href=&quot;https://pypi.python.org/pypi/PySimpleGUIWx/&quot;&gt;wxPython&lt;/a&gt; and &lt;a href=&quot;https://pypi.python.org/pypi/PySimpleGUIQt/&quot;&gt;QT&lt;/a&gt; wrappers on &lt;a href=&quot;https://realpython.com/pypi-publish-python-package/&quot;&gt;PyPI&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;While many people know hangman well, it’s helpful to have a formal description of the game. You’ll use this description to resolve programming issues later during development. The game’s description could vary from person to person. In this tutorial, you’ll describe the game as follows:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Game setup&lt;/strong&gt;: The game of hangman is for two or more players, comprising a &lt;strong&gt;selecting player&lt;/strong&gt; and one or more &lt;strong&gt;guessing players&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Word selection&lt;/strong&gt;: The selecting player selects a word that the guessing players will try to guess.&lt;ul&gt;
&lt;li&gt;The selected word is traditionally represented as a series of underscores for each letter in the word.&lt;/li&gt;
&lt;li&gt;The selecting player also draws a scaffold to hold the hangman illustration.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Guessing&lt;/strong&gt;: The guessing players attempt to guess the word by selecting letters one at a time.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Feedback&lt;/strong&gt;: The selecting player indicates whether each guessed letter appears in the word.&lt;ul&gt;
&lt;li&gt;If the letter appears, then the selecting player replaces each underscore with the letter as it appears in the word.&lt;/li&gt;
&lt;li&gt;If the letter doesn’t appear, then the selecting player writes the letter in a list of guessed letters. Then, they draw the next piece of the hanged man. To draw the hanged man, they begin with the head, then the torso, the arms, and the legs for a total of six parts.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Winning conditions&lt;/strong&gt;: The selecting player wins if the hanged man drawing is complete after six incorrect guesses, in which case the game is over. The guessing players win if they guess the word.&lt;ul&gt;
&lt;li&gt;If the guess is right, the game is over, and the guessing players win.&lt;/li&gt;
&lt;li&gt;If the guess is wrong, the game continues.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;A game in progress is shown below. In this game, the word is &lt;em&gt;hangman&lt;/em&gt;:&lt;/p&gt;
&lt;figure class=&quot;js-lightbox&quot;&gt;&lt;a href=&quot;https://files.realpython.com/media/Hangman_CLI_-_page_22.2b446e354404.png&quot; target=&quot;_blank&quot;&gt;&lt;img loading=&quot;lazy&quot; class=&quot;img-fluid mx-auto d-block w-66&quot; src=&quot;https://files.realpython.com/media/Hangman_CLI_-_page_22.2b446e354404.png&quot; width=&quot;1000&quot; height=&quot;1350&quot; srcset=&quot;https://robocrop.realpython.net/?url=https%3A//files.realpython.com/media/Hangman_CLI_-_page_22.2b446e354404.png&amp;amp;w=250&amp;amp;sig=430e659223daa02cf6f239f44419e96f90890bd8 250w, https://robocrop.realpython.net/?url=https%3A//files.realpython.com/media/Hangman_CLI_-_page_22.2b446e354404.png&amp;amp;w=333&amp;amp;sig=6f84d2eb1a83d96259ffe306bef461078240815b 333w, https://robocrop.realpython.net/?url=https%3A//files.realpython.com/media/Hangman_CLI_-_page_22.2b446e354404.png&amp;amp;w=500&amp;amp;sig=0cbbe4bcb2a612d2833bc4106cf8e9cc8eaf4e9f 500w, https://files.realpython.com/media/Hangman_CLI_-_page_22.2b446e354404.png 1000w&quot; sizes=&quot;(min-width: 1200px) 690px, (min-width: 780px) calc(-5vw + 669px), (min-width: 580px) 510px, calc(100vw - 30px)&quot; alt=&quot;A game of hangman in progress&quot; data-asset=&quot;2977&quot;&gt;&lt;/a&gt;&lt;/figure&gt;

&lt;p&gt;In this tutorial, you’ll make a few additional design decisions while writing the hangman game in Python:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The game will be between the &lt;strong&gt;computer&lt;/strong&gt; and &lt;strong&gt;one human player&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;computer&lt;/strong&gt; will act as the selecting player and will &lt;strong&gt;select&lt;/strong&gt; the word to guess, &lt;strong&gt;process&lt;/strong&gt; human input, and &lt;strong&gt;handle&lt;/strong&gt; all output.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;human&lt;/strong&gt; player is the &lt;strong&gt;guessing player&lt;/strong&gt;, hereafter simply referred to as the &lt;em&gt;player&lt;/em&gt;. When the player knows the word, they continue to guess correct letters until the word is complete.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;With this basic understanding of the game and some design decisions for the computer version, you can begin creating the game. First, however, you need to be aware of some knowledge requirements.&lt;/p&gt;
&lt;h2 id=&quot;prerequisites&quot;&gt;Prerequisites&lt;a class=&quot;headerlink&quot; href=&quot;#prerequisites&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The project that that you’ll build in this tutorial will require familiarity with general Python programming. You should have basic knowledge of the following topics:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Creating GUI apps with &lt;a href=&quot;https://realpython.com/pysimplegui-python/&quot;&gt;PySimpleGUI&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Working with &lt;a href=&quot;https://realpython.com/working-with-files-in-python/&quot;&gt;files&lt;/a&gt; and the &lt;a href=&quot;https://realpython.com/python-with-statement/&quot;&gt;&lt;code&gt;with&lt;/code&gt; statement&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Defining your own &lt;a href=&quot;https://realpython.com/python-classes/&quot;&gt;classes&lt;/a&gt; and working with &lt;a href=&quot;https://realpython.com/python3-object-oriented-programming/&quot;&gt;object-oriented programming&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Writing &lt;a href=&quot;https://realpython.com/python-for-loop/&quot;&gt;&lt;code&gt;for&lt;/code&gt;&lt;/a&gt; loops, &lt;a href=&quot;https://realpython.com/python-while-loop/&quot;&gt;&lt;code&gt;while&lt;/code&gt;&lt;/a&gt; loops, and &lt;a href=&quot;https://realpython.com/list-comprehension-python/&quot;&gt;comprehensions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Working with &lt;a href=&quot;https://realpython.com/python-conditional-statements/&quot;&gt;conditional statements&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Working with Python &lt;a href=&quot;https://realpython.com/python-strings/&quot;&gt;strings&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python-list/&quot;&gt;lists&lt;/a&gt;, and &lt;a href=&quot;https://realpython.com/python-sets/&quot;&gt;sets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;However, if you don’t have all this knowledge yet, then that’s okay! You might learn more by going ahead and giving the project a shot. You can always stop and review the resources linked here if you get stuck.&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/hangman-python-pysimplegui/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/hangman-python-pysimplegui/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>How to Get the Current Time in Python</title>
      <id>https://realpython.com/courses/python-get-current-time/</id>
      <link href="https://realpython.com/courses/python-get-current-time/"/>
      <updated>2023-12-05T14:00:00+00:00</updated>
      <summary>In this video course, you&#x27;ll be getting the current time in Python. You&#x27;ll get your hands on a datetime object that represents the current time. You&#x27;ll see how to format it according to international standards, and you&#x27;ll even check out how computers represent time.</summary>
      <content type="html">
        &lt;p&gt;Getting the &lt;strong&gt;current time&lt;/strong&gt; in Python is a nice starting point for many time-related operations. One very important use case is creating &lt;a href=&quot;https://en.wikipedia.org/wiki/Timestamp&quot;&gt;timestamps&lt;/a&gt;. In this tutorial, you&amp;rsquo;ll learn how to &lt;strong&gt;get&lt;/strong&gt;, &lt;strong&gt;display&lt;/strong&gt;, and &lt;strong&gt;format&lt;/strong&gt; the current time with the &lt;a href=&quot;https://docs.python.org/3/library/datetime.html&quot;&gt;&lt;code&gt;datetime&lt;/code&gt;&lt;/a&gt; module.&lt;/p&gt;
&lt;p&gt;To effectively use the current time in your Python applications, you&amp;rsquo;ll add a few tools to your belt. For instance, you&amp;rsquo;ll learn how to &lt;strong&gt;read attributes&lt;/strong&gt; of the current time, like the year, minutes, or seconds. To make the time more easily readable, you&amp;rsquo;ll explore options for &lt;strong&gt;printing&lt;/strong&gt; it. You&amp;rsquo;ll also get to know different &lt;strong&gt;formats&lt;/strong&gt; of time and understand how to deal with &lt;strong&gt;time zones&lt;/strong&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>Serialize Your Data With Python</title>
      <id>https://realpython.com/python-serialize-data/</id>
      <link href="https://realpython.com/python-serialize-data/"/>
      <updated>2023-12-04T14:00:00+00:00</updated>
      <summary>In this in-depth tutorial, you&#x27;ll explore the world of data serialization in Python. You&#x27;ll compare and use different data serialization formats, serialize Python objects and executable code, and handle HTTP message payloads.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Whether you’re a data scientist crunching &lt;strong&gt;big data&lt;/strong&gt; in a distributed cluster, a back-end engineer building scalable &lt;strong&gt;microservices&lt;/strong&gt;, or a front-end developer consuming &lt;strong&gt;web APIs&lt;/strong&gt;, you should understand data serialization. In this comprehensive guide, you’ll move beyond XML and JSON to explore several data formats that you can use to serialize data in Python. You’ll explore them based on their use cases, learning about their distinct categories.&lt;/p&gt;
&lt;p&gt;By the end of this tutorial, you’ll have a deep understanding of the many data interchange formats available. You’ll master the ability to persist and transfer stateful objects, effectively making them immortal and transportable through time and space. Finally, you’ll learn to send executable code over the network, unlocking the potential of remote computation and distributed processing.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this tutorial, you’ll learn how to:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Choose a suitable &lt;strong&gt;data serialization format&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Take snapshots of &lt;strong&gt;stateful Python objects&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Send &lt;strong&gt;executable code&lt;/strong&gt; over the wire for &lt;strong&gt;distributed processing&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Adopt popular data formats for &lt;strong&gt;HTTP message payloads&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Serialize &lt;strong&gt;hierarchical&lt;/strong&gt;, &lt;strong&gt;tabular&lt;/strong&gt;, and other &lt;strong&gt;shapes of data&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Employ &lt;strong&gt;schemas&lt;/strong&gt; for validating and evolving the structure of data&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To get the most out of this tutorial, you should have a good understanding of &lt;a href=&quot;https://realpython.com/python3-object-oriented-programming/&quot;&gt;object-oriented programming&lt;/a&gt; principles, including &lt;a href=&quot;https://realpython.com/python-classes/&quot;&gt;classes&lt;/a&gt; and &lt;a href=&quot;https://realpython.com/python-data-classes/&quot;&gt;data classes&lt;/a&gt;, as well as &lt;a href=&quot;https://realpython.com/python-type-checking/&quot;&gt;type hinting&lt;/a&gt; in Python. Additionally, familiarity with the &lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Web/HTTP&quot;&gt;HTTP protocol&lt;/a&gt; and &lt;a href=&quot;https://realpython.com/learning-paths/become-python-web-developer/&quot;&gt;Python web frameworks&lt;/a&gt; would be a plus. This knowledge will make it easier for you to follow along with the tutorial.&lt;/p&gt;
&lt;p&gt;You can download all the code samples accompanying this tutorial by clicking the link below:&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown=&quot;1&quot;&gt;Get Your Code:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/python-serialize-data-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-python-serialize-data-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 serialize your data with Python.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Feel free to skip ahead and focus on the part that interests you the most, or buckle up and get ready to catapult your data management skills to a whole new level!&lt;/p&gt;
&lt;h2 id=&quot;get-an-overview-of-data-serialization&quot;&gt;Get an Overview of Data Serialization&lt;a class=&quot;headerlink&quot; href=&quot;#get-an-overview-of-data-serialization&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Serialization&lt;/strong&gt;, also known as &lt;strong&gt;marshaling&lt;/strong&gt;, is the process of translating a piece of data into an interim representation that’s suitable for &lt;a href=&quot;https://en.wikipedia.org/wiki/Data_communication&quot;&gt;transmission&lt;/a&gt; through a network or &lt;a href=&quot;https://en.wikipedia.org/wiki/Persistence_(computer_science)&quot;&gt;persistent storage&lt;/a&gt; on a medium like an optical disk. Because the serialized form isn’t useful on its own, you’ll eventually want to restore the original data. The inverse operation, which can occur on a remote machine, is called &lt;strong&gt;deserialization&lt;/strong&gt; or &lt;strong&gt;unmarshaling&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; Although the terms &lt;a href=&quot;https://en.wikipedia.org/wiki/Serialization&quot;&gt;serialization&lt;/a&gt; and &lt;a href=&quot;https://en.wikipedia.org/wiki/Marshalling_(computer_science)&quot;&gt;marshaling&lt;/a&gt; are often used interchangeably, they can have slightly different meanings for different people. In some circles, serialization is only concerned with the translation part, while marshaling is also about moving data from one place to another.&lt;/p&gt;
&lt;p&gt;The precise meaning of each term depends on whom you ask. For example, Java programmers tend to use the word &lt;em&gt;marshaling&lt;/em&gt; in the context of &lt;a href=&quot;https://en.wikipedia.org/wiki/Java_remote_method_invocation&quot;&gt;remote method invocation (RMI)&lt;/a&gt;. In Python, marshaling refers almost exclusively to the format used for storing the compiled &lt;a href=&quot;https://en.wikipedia.org/wiki/Bytecode&quot;&gt;bytecode&lt;/a&gt; instructions.&lt;/p&gt;
&lt;p&gt;Check out the &lt;a href=&quot;https://en.wikipedia.org/wiki/Marshalling_(computer_science)#Comparison_with_serialization&quot;&gt;comparison of serialization and marshaling&lt;/a&gt; on Wikipedia for more details.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;The name &lt;em&gt;serialization&lt;/em&gt; implies that your data, which may be structured as a dense graph of objects in the computer’s memory, becomes a linear sequence—or a &lt;strong&gt;series&lt;/strong&gt;—of &lt;a href=&quot;https://en.wikipedia.org/wiki/Byte&quot;&gt;bytes&lt;/a&gt;. Such a linear representation is perfect to transmit or store. Raw bytes are universally understood by various programming languages, operating systems, and hardware architectures, making it possible to exchange data between otherwise incompatible systems.&lt;/p&gt;
&lt;p&gt;When you visit an online store using your web browser, chances are it runs a piece of &lt;a href=&quot;https://realpython.com/python-vs-javascript/&quot;&gt;JavaScript&lt;/a&gt; code in the background to communicate with a back-end system. That back end might be implemented in &lt;a href=&quot;https://realpython.com/learning-paths/flask-by-example/&quot;&gt;Flask&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/learning-paths/django-web-development/&quot;&gt;Django&lt;/a&gt;, or &lt;a href=&quot;https://realpython.com/fastapi-python-web-apis/&quot;&gt;FastAPI&lt;/a&gt;, which are Python web frameworks. Because JavaScript and Python are two different languages with distinct syntax and data types, they must share information using an interchange format that both sides can understand.&lt;/p&gt;
&lt;p&gt;In other words, parties on opposite ends of a digital conversation may deserialize the same piece of information into wildly different internal representations due to their technical constraints and specifications. However, it would still be the same information from a semantic point of view.&lt;/p&gt;
&lt;p&gt;Tools like &lt;a href=&quot;https://nodejs.org/en&quot;&gt;Node.js&lt;/a&gt; make it possible to run JavaScript on the back end, including &lt;a href=&quot;https://en.wikipedia.org/wiki/Isomorphic_JavaScript&quot;&gt;isomorphic JavaScript&lt;/a&gt; that can run on both the client and the server in an unmodified form. This eliminates language discrepancies altogether but doesn’t address more subtle nuances, such as &lt;a href=&quot;https://realpython.com/python-bitwise-operators/#big-endian-vs-little-endian&quot;&gt;big-endian vs little-endian&lt;/a&gt; differences in hardware.&lt;/p&gt;
&lt;p&gt;Other than that, transporting data from one machine to another still requires converting it into a network-friendly format. Specifically, the format should allow the sender to partition and put the data into &lt;a href=&quot;https://en.wikipedia.org/wiki/Network_packet&quot;&gt;network packets&lt;/a&gt;, which the receiving machine can later correctly reassemble. Network protocols are fairly low-level, so they deal with streams of bytes rather than high-level data types.&lt;/p&gt;
&lt;p&gt;Depending on your use case, you’ll want to pick a &lt;strong&gt;data serialization format&lt;/strong&gt; that offers the best trade-off between its pros and cons. In the next section, you’ll learn about various categories of data formats used in serialization. If you already have prior knowledge about these formats and would like to explore their respective scenarios, then feel free to skip the basic introduction coming up next.&lt;/p&gt;
&lt;h2 id=&quot;compare-data-serialization-formats&quot;&gt;Compare Data Serialization Formats&lt;a class=&quot;headerlink&quot; href=&quot;#compare-data-serialization-formats&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;There are many ways to classify data serialization formats. Some of these categories aren’t mutually exclusive, making certain formats fall under a few of them simultaneously. In this section, you’ll find an overview of the different categories, their trade-offs, and use cases, as well as examples of popular data serialization formats.&lt;/p&gt;
&lt;p&gt;Later, you’ll get your hands on some practical applications of these data serialization formats under different programming scenarios. To follow along, download the sample code mentioned in the introduction and install the required dependencies from the included &lt;code&gt;requirements.txt&lt;/code&gt; file into an active &lt;a href=&quot;https://realpython.com/python-virtual-environments-a-primer/&quot;&gt;virtual environment&lt;/a&gt; by issuing 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;&gt;&lt;span class=&quot;icon baseline js-codeblock-output-on codeblock__header--icon-lower&quot;&gt;&lt;svg&gt;&lt;use href=&quot;/static/icons.55e8f03acfe3.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;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;-r&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;requirements.txt
&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;&gt;&lt;svg&gt;&lt;use href=&quot;/static/icons.55e8f03acfe3.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;&gt;&lt;svg&gt;&lt;use href=&quot;/static/icons.55e8f03acfe3.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 will install several third-party libraries, frameworks, and tools that will allow you to navigate through the remaining part of this tutorial smoothly.&lt;/p&gt;
&lt;h3 id=&quot;textual-vs-binary&quot;&gt;Textual vs Binary&lt;a class=&quot;headerlink&quot; href=&quot;#textual-vs-binary&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;At the end of the day, all serialized data becomes a stream of bytes regardless of its original shape or form. But some byte values—or their specific arrangement—may correspond to &lt;a href=&quot;https://en.wikipedia.org/wiki/Code_point&quot;&gt;Unicode code points&lt;/a&gt; with a meaningful and human-readable representation. Data serialization formats whose syntax consists purely of characters visible to the naked eye are called &lt;strong&gt;textual data formats&lt;/strong&gt;, as opposed to &lt;strong&gt;binary data formats&lt;/strong&gt; meant for machines to read.&lt;/p&gt;
&lt;p&gt;The main benefit of a textual data format is that people like you can read serialized messages, make sense of them, and even edit them by hand when needed. In many cases, these data formats are self-explanatory, with descriptive element or attribute names. For example, take a look at this excerpt from the Real Python &lt;a href=&quot;https://en.wikipedia.org/wiki/Web_feed&quot;&gt;web feed&lt;/a&gt; with information about the latest tutorials and courses published:&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python-serialize-data/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-serialize-data/ »&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 #182: Building a Python JSON Parser &amp; Discussing Ideas for PEPs</title>
      <id>https://realpython.com/podcasts/rpp/182/</id>
      <link href="https://realpython.com/podcasts/rpp/182/"/>
      <updated>2023-12-01T12:00:00+00:00</updated>
      <summary>Have you thought of a way to improve the Python language? How do you share your idea with core developers and start a discussion in the Python community? 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;Have you thought of a way to improve the Python language? How do you share your idea with core developers and start a discussion in the Python community? 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>Advent of Code: Solving Puzzles With Python</title>
      <id>https://realpython.com/courses/python-advent-of-code/</id>
      <link href="https://realpython.com/courses/python-advent-of-code/"/>
      <updated>2023-11-28T14:00:00+00:00</updated>
      <summary>Advent of Code is an online advent calendar that shares new programming puzzles each day from December 1 to the 25. In this Code Conversation, you&#x27;ll learn why solving programming puzzles can be beneficial and how you can get started with Advent of Code using Python.</summary>
      <content type="html">
        &lt;p&gt;Advent of Code is an online Advent calendar where you&amp;rsquo;ll find new programming puzzles offered each day from December 1 to 25. While you can solve the puzzles at any time, the excitement when new puzzles unlock is really something special. You can participate in Advent of Code in any programming language&amp;mdash;including Python!&lt;/p&gt;
&lt;p&gt;With the help of this Code Conversation, you&amp;rsquo;ll be ready to start solving puzzles and earning your first gold stars.&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 an &lt;strong&gt;online Advent calendar&lt;/strong&gt; is&lt;/li&gt;
&lt;li&gt;How solving puzzles can &lt;strong&gt;advance your programming skills&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;How you can &lt;strong&gt;participate&lt;/strong&gt; in Advent of Code&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Advent of Code puzzles are designed to be approachable by anyone with an interest in problem-solving. You don&amp;rsquo;t need a heavy computer science background to participate. Instead, Advent of Code is a great arena for learning new skills and testing out new features of 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 Basics Exercises: Modules and Packages</title>
      <id>https://realpython.com/courses/python-modules-packages-exercises/</id>
      <link href="https://realpython.com/courses/python-modules-packages-exercises/"/>
      <updated>2023-11-21T14:00:00+00:00</updated>
      <summary>In this video course, you&#x27;ll practice separating your code into modules, using the import statement to access another module&#x27;s namespace, and creating Python packages.</summary>
      <content type="html">
        &lt;p&gt;In &lt;a href=&quot;https://realpython.com/courses/python-basics-modules-packages/&quot;&gt;Python Basics: Modules and Packages&lt;/a&gt;, you learned how to build an application by putting related code into separate files called &lt;strong&gt;modules&lt;/strong&gt;. You also used the &lt;strong&gt;&lt;code&gt;import&lt;/code&gt; statement&lt;/strong&gt; to use modules in another file.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this video course, you&amp;rsquo;ll practice:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Creating&lt;/strong&gt; your own modules&lt;/li&gt;
&lt;li&gt;Using modules in another file through the &lt;strong&gt;&lt;code&gt;import&lt;/code&gt; statement&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Organizing several modules into a &lt;strong&gt;package&lt;/strong&gt; with &lt;code&gt;__init__.py&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Along the way, you&amp;rsquo;ll also get some insight into how to tackle coding challenges in general, which can be a great way to level up as a developer.&lt;/p&gt;
&lt;p&gt;This video course is part of the Python Basics series, which accompanies &lt;a href=&quot;https://realpython.com/products/python-basics-book/&quot;&gt;&lt;em&gt;Python Basics: A Practical Introduction to Python 3&lt;/em&gt;&lt;/a&gt;. You can also check out the other &lt;a href=&quot;https://realpython.com/learning-paths/python-basics/&quot;&gt;Python Basics courses&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;Note that you&amp;rsquo;ll be using &lt;a href=&quot;https://realpython.com/python-idle/&quot;&gt;IDLE&lt;/a&gt; to &lt;a href=&quot;https://realpython.com/interacting-with-python/&quot;&gt;interact with Python&lt;/a&gt; throughout this course. If you&amp;rsquo;re just getting started, then you might want to check out &lt;a href=&quot;https://realpython.com/courses/setting-up-python/&quot;&gt;Python Basics: Setting Up Python&lt;/a&gt; before diving into this course.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast – Episode #181: Computational Thinking &amp; Learning Python During an AI Revolution</title>
      <id>https://realpython.com/podcasts/rpp/181/</id>
      <link href="https://realpython.com/podcasts/rpp/181/"/>
      <updated>2023-11-17T12:00:00+00:00</updated>
      <summary>Has the current growth of artificial intelligence (AI) systems made you wonder what the future holds for Python developers? What are the hidden benefits of learning to program in Python and practicing computational thinking? This week on the show, we speak with author Lawrence Gray about his upcoming book &quot;Mastering Python: A Problem Solving Approach.&quot;</summary>
      <content type="html">
        &lt;p&gt;Has the current growth of artificial intelligence (AI) systems made you wonder what the future holds for Python developers? What are the hidden benefits of learning to program in Python and practicing computational thinking? This week on the show, we speak with author Lawrence Gray about his upcoming book &quot;Mastering Python: A Problem Solving Approach.&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>Python Basics: Modules and Packages</title>
      <id>https://realpython.com/courses/python-basics-modules-packages/</id>
      <link href="https://realpython.com/courses/python-basics-modules-packages/"/>
      <updated>2023-11-14T14:00:00+00:00</updated>
      <summary>In this Python Basics video course, you&#x27;ll learn how to build an application by putting related code into separate files called modules. You&#x27;ll also use the import statement to use modules in another file.</summary>
      <content type="html">
        &lt;p&gt;As you gain experience writing code, you&amp;rsquo;ll eventually work on
projects that are so large that keeping all the code in a single file
becomes cumbersome.&lt;/p&gt;
&lt;p&gt;Instead of writing a single file, you can put related code into separate
files called &lt;strong&gt;modules&lt;/strong&gt;. You can put individual modules together like
building blocks to create a larger application.&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;&lt;strong&gt;Create&lt;/strong&gt; your own modules&lt;/li&gt;
&lt;li&gt;Use modules in another file through the &lt;strong&gt;&lt;code&gt;import&lt;/code&gt; statement&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Organize several modules into a &lt;strong&gt;package&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This video course is part of the Python Basics series, which accompanies &lt;a href=&quot;https://realpython.com/products/python-basics-book/&quot;&gt;&lt;em&gt;Python Basics: A Practical Introduction to Python 3&lt;/em&gt;&lt;/a&gt;. You can also check out the other &lt;a href=&quot;https://realpython.com/learning-paths/python-basics/&quot;&gt;Python Basics courses&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;Note that you&amp;rsquo;ll be using &lt;a href=&quot;https://realpython.com/python-idle/&quot;&gt;IDLE&lt;/a&gt; to &lt;a href=&quot;https://realpython.com/interacting-with-python/&quot;&gt;interact with Python&lt;/a&gt; throughout this course.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast – Episode #180: Studying Python Software Architecture &amp; Creating Lambda Expressions</title>
      <id>https://realpython.com/podcasts/rpp/180/</id>
      <link href="https://realpython.com/podcasts/rpp/180/"/>
      <updated>2023-11-10T12:00:00+00:00</updated>
      <summary>Have you moved through the fundamentals of Python, and are you now considering building a more extensive project or complete application? Where can you study the architecture of existing Python projects and learn best practices? 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;Have you moved through the fundamentals of Python, and are you now considering building a more extensive project or complete application? Where can you study the architecture of existing Python projects and learn best practices? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder&#x27;s Weekly articles and projects.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Python Basics Exercises: Numbers and Math</title>
      <id>https://realpython.com/courses/numbers-and-math-exercises/</id>
      <link href="https://realpython.com/courses/numbers-and-math-exercises/"/>
      <updated>2023-11-07T14:00:00+00:00</updated>
      <summary>In this Python Basics Exercises course, you&#x27;ll practice the math that you need for your Python programming journey. This includes integers and floating-point numbers, arithmetic operators, and string formatting for numbers.</summary>
      <content type="html">
        &lt;p&gt;In &lt;a href=&quot;https://realpython.com/courses/python-basics-numbers-and-math/&quot;&gt;Python Basics: Numbers and Math&lt;/a&gt;, you learned the mathematical skills that you&amp;rsquo;ll need as a Python programmer. Now, you&amp;rsquo;ll take those skills to the next level by actively practicing and applying what you&amp;rsquo;ve learned.&lt;/p&gt;
&lt;p&gt;In this hands-on course, you&amp;rsquo;ll have the opportunity to reinforce your understanding of numbers and math in Python programming through a series of exercises and coding challenges. By actively engaging with the material, you&amp;rsquo;ll gain the confidence you need to apply your learning in real-world scenarios.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this course, you&amp;rsquo;ll practice:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Creating &lt;strong&gt;integers&lt;/strong&gt; and &lt;strong&gt;floating-point numbers&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Using &lt;strong&gt;arithmetic expressions&lt;/strong&gt;, &lt;strong&gt;math functions&lt;/strong&gt;, and &lt;strong&gt;number methods&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Formatting and displaying numbers in &lt;strong&gt;strings&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Taking numbers as &lt;strong&gt;user input&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In working through these exercises, you&amp;rsquo;ll deepen your knowledge and solidify your understanding of the Python language. You&amp;rsquo;ll not only gain confidence in your programming abilities but also enhance your problem-solving skills.&lt;/p&gt;
&lt;p&gt;This course is part of the Python Basics series, which accompanies &lt;a href=&quot;https://realpython.com/products/python-basics-book/&quot;&gt;&lt;em&gt;Python Basics: A Practical Introduction to Python 3&lt;/em&gt;&lt;/a&gt;. You can also check out other &lt;a href=&quot;https://realpython.com/learning-paths/python-basics/&quot;&gt;Python Basics courses&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Note that you&amp;rsquo;ll be using &lt;a href=&quot;https://realpython.com/python-idle/&quot;&gt;IDLE&lt;/a&gt; to &lt;a href=&quot;https://realpython.com/interacting-with-python/&quot;&gt;interact with Python&lt;/a&gt; throughout this course. If you&amp;rsquo;re just getting started, then you might want to check out &lt;a href=&quot;https://realpython.com/courses/setting-up-python/&quot;&gt;Python Basics: Setting Up Python&lt;/a&gt; before diving into this course.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast – Episode #179: Improving Your Git Developer Experience in Python</title>
      <id>https://realpython.com/podcasts/rpp/179/</id>
      <link href="https://realpython.com/podcasts/rpp/179/"/>
      <updated>2023-11-03T12:00:00+00:00</updated>
      <summary>Are you getting by with a few fundamental commands for Git when building your Python projects? Would you like to improve your version control techniques and become more efficient with the Git command line? This week on the show, Adam Johnson is back to talk about his new book, &quot;Boost Your Git DX.&quot;</summary>
      <content type="html">
        &lt;p&gt;Are you getting by with a few fundamental commands for Git when building your Python projects? Would you like to improve your version control techniques and become more efficient with the Git command line? This week on the show, Adam Johnson is back to talk about his new book, &quot;Boost Your Git DX.&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>Using the bpython Enhanced REPL</title>
      <id>https://realpython.com/courses/using-bpython-enhanced-repl/</id>
      <link href="https://realpython.com/courses/using-bpython-enhanced-repl/"/>
      <updated>2023-10-31T14:00:00+00:00</updated>
      <summary>In this video course, you&#x27;ll learn about bpython, an alternative Python REPL that brings code suggestions and many other IDE-like features to the terminal. Once you discover how much bpython can improve your productivity, you&#x27;ll never want to return to using the vanilla Python REPL again.</summary>
      <content type="html">
        &lt;p&gt;The standard Python interpreter lets you &lt;a href=&quot;https://realpython.com/run-python-scripts/&quot;&gt;run scripts&lt;/a&gt; from files or &lt;a href=&quot;https://realpython.com/interacting-with-python/&quot;&gt;interactively execute code&lt;/a&gt; on the fly in a so-called &lt;strong&gt;read-evaluate-print loop (REPL)&lt;/strong&gt;. While this is a powerful tool for exploring the language and discovering its libraries through instant feedback on your code inputs, the default REPL shipped with Python has several limitations. Luckily, alternatives like &lt;strong&gt;bpython&lt;/strong&gt; offer a much more programmer-friendly and convenient experience.&lt;/p&gt;
&lt;p&gt;You can use bpython to experiment with your code or quickly test an idea without switching contexts between different programs, just like in an &lt;strong&gt;integrated development environment (IDE)&lt;/strong&gt;. In addition, bpython may be a valuable teaching tool in either a virtual or physical classroom.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this course, you&amp;rsquo;ll learn how to:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Install and use bpython as your &lt;strong&gt;alternative Python REPL&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Boost your &lt;strong&gt;productivity&lt;/strong&gt; thanks to bpython&amp;rsquo;s unique features&lt;/li&gt;
&lt;li&gt;Tweak bpython&amp;rsquo;s &lt;strong&gt;configuration&lt;/strong&gt; and its &lt;strong&gt;color theme&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Use common &lt;strong&gt;keyboard shortcuts&lt;/strong&gt; to code more quickly&lt;/li&gt;
&lt;li&gt;Contribute to bpython&amp;rsquo;s &lt;strong&gt;open-source&lt;/strong&gt; project on GitHub&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Before starting this course, make sure you&amp;rsquo;re already familiar with &lt;a href=&quot;https://realpython.com/products/python-basics-book/&quot;&gt;Python basics&lt;/a&gt; and know how to start the &lt;a href=&quot;https://realpython.com/python-repl/&quot;&gt;standard Python REPL&lt;/a&gt; in the command line. In addition, you should be able to &lt;a href=&quot;https://realpython.com/what-is-pip/&quot;&gt;install packages with &lt;code&gt;pip&lt;/code&gt;&lt;/a&gt;, ideally into a &lt;a href=&quot;https://realpython.com/python-virtual-environments-a-primer/&quot;&gt;virtual environment&lt;/a&gt;.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast – Episode #178: Guiding Scientific Python Library Development</title>
      <id>https://realpython.com/podcasts/rpp/178/</id>
      <link href="https://realpython.com/podcasts/rpp/178/"/>
      <updated>2023-10-27T12:00:00+00:00</updated>
      <summary>How do you prepare a scientific Python project for sharing with others? Could you use some best practices and guidance for packaging, documentation, and testing? 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 do you prepare a scientific Python project for sharing with others? Could you use some best practices and guidance for packaging, documentation, and testing? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder&#x27;s Weekly articles and projects.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  

</feed>
