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

  
    <entry>
      <title>How to Evaluate the Quality of Python Packages</title>
      <id>https://realpython.com/python-package-quality/</id>
      <link href="https://realpython.com/python-package-quality/"/>
      <updated>2023-03-15T14:00:00+00:00</updated>
      <summary>Just like you shouldn&#x27;t download any file from the Internet, you shouldn&#x27;t blindly install third-party Python packages without evaluating them first. This tutorial will give you the toolset to evaluate the quality of external Python packages before you implement them into your Python projects.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Installing packages with Python is just one &lt;code&gt;pip install&lt;/code&gt; command away.
That’s one of the many great qualities that the Python ecosystem has to offer.&lt;/p&gt;
&lt;p&gt;However, you may have downloaded a &lt;strong&gt;third-party package&lt;/strong&gt; once that didn’t work out for you in one way or another.
For example, the package didn’t support the Python version that you were using in your project, or the package didn’t do what you expected it to do.&lt;/p&gt;
&lt;p&gt;By understanding the characteristics of a high-quality Python package, you can avoid introducing incompatible or even harmful code into your project.
In this tutorial, you’ll learn how the &lt;strong&gt;Python Package Index&lt;/strong&gt; can give you a first impression of a package. Then you’ll dig even deeper by checking out &lt;strong&gt;Libraries.io&lt;/strong&gt;, the &lt;strong&gt;GitHub repository&lt;/strong&gt;, and the &lt;strong&gt;license&lt;/strong&gt; of any Python package that you want to use.&lt;/p&gt;
&lt;p&gt;In the end, you’ll know how to evaluate third-party packages that you can find online before you implement them into your Python projects.&lt;/p&gt;
&lt;p&gt;For future reference, you can also download this handy &lt;strong&gt;flowchart&lt;/strong&gt; that’ll help you decide if a third-party Python package works for your particular situation:&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;Bonus Download:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/python-package-quality-flowchart/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-python-package-quality-flowchart&quot; data-focus=&quot;false&quot; markdown=&quot;1&quot;&gt;Click here to download the free flowchart&lt;/a&gt; that you can use to evaluate the quality of Python packages.&lt;/p&gt;
&lt;/div&gt;
&lt;h2 id=&quot;how-to-evaluate-the-quality-of-third-party-python-packages&quot;&gt;How to Evaluate the Quality of Third-Party Python Packages&lt;a class=&quot;headerlink&quot; href=&quot;#how-to-evaluate-the-quality-of-third-party-python-packages&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The &lt;a href=&quot;https://pypi.org&quot;&gt;Python Package Index&lt;/a&gt; (PyPI) provides the largest collection of external &lt;a href=&quot;https://realpython.com/python-modules-packages/&quot;&gt;Python packages&lt;/a&gt;. Before you &lt;a href=&quot;https://realpython.com/what-is-pip/&quot;&gt;install a package with &lt;code&gt;pip&lt;/code&gt;&lt;/a&gt;, you should make sure that it’s available on PyPI:&lt;/p&gt;
&lt;figure class=&quot;js-lightbox&quot;&gt;&lt;a href=&quot;https://files.realpython.com/media/pypi-website.f5b943521a31.png&quot; target=&quot;_blank&quot;&gt;&lt;img loading=&quot;lazy&quot; class=&quot;img-fluid mx-auto d-block border &quot; src=&quot;https://files.realpython.com/media/pypi-website.f5b943521a31.png&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;https://robocrop.realpython.net/?url=https%3A//files.realpython.com/media/pypi-website.f5b943521a31.png&amp;amp;w=480&amp;amp;sig=50048f995bb11834641ede026351f9b038c65350 480w, https://robocrop.realpython.net/?url=https%3A//files.realpython.com/media/pypi-website.f5b943521a31.png&amp;amp;w=640&amp;amp;sig=024b90be8919fde0d023edb4e69275399c9d8ec3 640w, https://robocrop.realpython.net/?url=https%3A//files.realpython.com/media/pypi-website.f5b943521a31.png&amp;amp;w=960&amp;amp;sig=f26c8017098eed2654196a5e79c96d68e113f326 960w, https://files.realpython.com/media/pypi-website.f5b943521a31.png 1920w&quot; sizes=&quot;(min-width: 1200px) 690px, (min-width: 780px) calc(-5vw + 669px), (min-width: 580px) 510px, calc(100vw - 30px)&quot; alt=&quot;Screenshot of the PyPI website&quot; data-asset=&quot;4941&quot;&gt;&lt;/a&gt;&lt;/figure&gt;

&lt;p&gt;Being able to find the package on PyPI is a good indicator that it’s legit, although you still need to be careful about what you’re getting.&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; It’s possible to &lt;code&gt;pip install&lt;/code&gt; a package from a &lt;a href=&quot;https://realpython.com/what-is-pip/#installing-packages-from-your-github-repositories&quot;&gt;Git repository&lt;/a&gt; or directly install a &lt;a href=&quot;https://realpython.com/python-wheels/&quot;&gt;Python wheel&lt;/a&gt; you find online.&lt;/p&gt;
&lt;p&gt;While you can download a Python package from anywhere, you should ask yourself if the package is high-quality and safe.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;On PyPI, you’ve got the option to either browse categories or search for keywords. 
Unless you’re looking for a very niche package, chances are that PyPI will present you with a list of thousands of packages that match your topic.&lt;/p&gt;
&lt;p&gt;To sort the order of the list, PyPI gives you two options:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Relevance&lt;/li&gt;
&lt;li&gt;Date last updated&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The option to sort by &lt;em&gt;Relevance&lt;/em&gt; is ambiguous because you don’t know what PyPI takes into consideration for this order. 
Still, when you sort by relevance, the packages appearing on top are indeed often the ones that suit your needs:&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/803895539?background=1&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;
  &lt;/div&gt;

&lt;/figure&gt;

&lt;p&gt;Sometimes, it can be tricky to find the right package on PyPI, even if you know the package’s name.
For example, when you search for &lt;em&gt;&lt;a href=&quot;https://realpython.com/beautiful-soup-web-scraper-python/&quot;&gt;beautiful soup&lt;/a&gt;&lt;/em&gt;, then you’ll get a number of similar-looking results.
That’s when &lt;em&gt;Relevance&lt;/em&gt; can come in handy.&lt;/p&gt;
&lt;p&gt;Out of curiosity, you may also peek into the packages that have been updated lately by using the &lt;em&gt;Date last updated&lt;/em&gt; order.
But usually the sorting makes irrelevant packages appear on top, just because they were updated recently.&lt;/p&gt;
&lt;p&gt;In most cases, a package doesn’t need to be cutting-edge unless it addresses a security issue.
Instead, it’s important that a package supports the &lt;strong&gt;Python version&lt;/strong&gt; of your project.
This is when the PyPI filter comes into play:&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/803895781?background=1&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;
  &lt;/div&gt;

&lt;/figure&gt;

&lt;p&gt;For example, when you want to use the &lt;a href=&quot;https://realpython.com/python311-new-features/&quot;&gt;cool new features of Python 3.11&lt;/a&gt; to full capacity, then you can select &lt;em&gt;Python 3.11&lt;/em&gt; in the list of &lt;em&gt;Programming Languages&lt;/em&gt; filters.&lt;/p&gt;
&lt;p&gt;Additionally, you can combine filters on PyPI.
It’s a good idea to also add &lt;strong&gt;Development Status&lt;/strong&gt; into your consideration by filtering for &lt;em&gt;Production/Stable&lt;/em&gt;, too.
This way, you increase the chances of working with reliable packages that have gone through thorough testing.&lt;/p&gt;
&lt;p&gt;When you’ve found a package that seems to fit your needs, then it’s time to put it under the microscope to make sure it’s safe and reliable. For this evaluation, you’ll study the &lt;strong&gt;PyPI details page&lt;/strong&gt;.
Clicking a package name brings you to a page that’s dedicated to the package:&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/803895646?background=1&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;
  &lt;/div&gt;

&lt;/figure&gt;

&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python-package-quality/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-package-quality/ »&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>Documenting Python Projects With Sphinx and Read the Docs</title>
      <id>https://realpython.com/courses/python-sphinx/</id>
      <link href="https://realpython.com/courses/python-sphinx/"/>
      <updated>2023-03-14T14:00:00+00:00</updated>
      <summary>In this video series, you&#x27;ll create project documentation from scratch using Sphinx, the de facto standard for Python. You&#x27;ll also hook your code repository up to Read The Docs to automatically build and publish your code documentation.</summary>
      <content type="html">
        &lt;p&gt;&lt;a href=&quot;https://www.sphinx-doc.org/&quot;&gt;Sphinx&lt;/a&gt; is a document generation tool that&amp;rsquo;s become the de facto standard for Python projects. It uses the &lt;a href=&quot;https://www.sphinx-doc.org/en/master/usage/restructuredtext/index.html&quot;&gt;reStructuredText&lt;/a&gt; (RST) markup language to define document structure and styling, and it can output in a wide variety of formats, including &lt;a href=&quot;https://realpython.com/html-css-python/&quot;&gt;HTML&lt;/a&gt;, &lt;a href=&quot;https://en.wikipedia.org/wiki/EPUB&quot;&gt;ePub&lt;/a&gt;, &lt;a href=&quot;https://en.wikipedia.org/wiki/Man_page&quot;&gt;man pages&lt;/a&gt;, and much more. Sphinx is extendable and has plugins for incorporating &lt;a href=&quot;https://docs.python.org/3/library/pydoc.html&quot;&gt;pydoc&lt;/a&gt; comments from your code into your docs and for using &lt;a href=&quot;https://jupyterbook.org/en/stable/content/myst.html&quot;&gt;MyST Markdown&lt;/a&gt; instead of RST.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://readthedocs.org/&quot;&gt;Read the Docs&lt;/a&gt; is a free document hosting site where many Python projects host their documentation. It integrates with &lt;a href=&quot;https://realpython.com/python-git-github-intro/&quot;&gt;GitHub&lt;/a&gt;, &lt;a href=&quot;https://about.gitlab.com/&quot;&gt;GitLab&lt;/a&gt;, and &lt;a href=&quot;https://bitbucket.org/&quot;&gt;Bitbucket&lt;/a&gt; to automatically pull new documentation sources from your repositories and build their Sphinx sources.&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;Write your documentation with &lt;strong&gt;Sphinx&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Structure and style your document with &lt;strong&gt;RST syntax&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Incorporate your &lt;strong&gt;pydoc&lt;/strong&gt; comments into your documentation&lt;/li&gt;
&lt;li&gt;Host your documentation on &lt;strong&gt;Read the Docs&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;With these skills, you&amp;rsquo;ll be able to write clear, reliable documentation that&amp;rsquo;ll help your users get the most out of your project.&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 February 2023</title>
      <id>https://realpython.com/python-news-february-2023/</id>
      <link href="https://realpython.com/python-news-february-2023/"/>
      <updated>2023-03-13T14:00:00+00:00</updated>
      <summary>February 2023 was a busy month for Python, with a new pandas 2.0.0 release candidate, exciting developments at pydantic, and more offerings at OpenAI. In addition, software and package security has been a key issue across the Python ecosystem.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;February is the shortest month, but it brought no shortage of activity in the Python world! Exciting developments include a &lt;strong&gt;new company&lt;/strong&gt; aiming to improve cloud services for developers, publication of the &lt;strong&gt;PyCon US 2023 schedule&lt;/strong&gt;, and the first release candidate for &lt;strong&gt;pandas 2.0.0&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;In the world of artifical intelligence, &lt;strong&gt;OpenAI&lt;/strong&gt; has continued to make strides. But while the &lt;strong&gt;Big Fix&lt;/strong&gt; has worked to reduce vulnerabily for programmers, more &lt;strong&gt;malicious programs&lt;/strong&gt; showed up on PyPI. &lt;/p&gt;
&lt;p&gt;Read on to dive into the biggest &lt;strong&gt;Python news&lt;/strong&gt; from the last month.&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;pydantic-launches-commercial-venture&quot;&gt;Pydantic Launches Commercial Venture&lt;a class=&quot;headerlink&quot; href=&quot;#pydantic-launches-commercial-venture&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;With over 40 million downloads per month, &lt;a href=&quot;https://pydantic.dev/&quot;&gt;pydantic&lt;/a&gt; is the most-used data validation library in Python. So when its founder, &lt;a href=&quot;https://twitter.com/samuel_colvin?lang=en&quot;&gt;Samuel Colvin&lt;/a&gt;, announces &lt;a href=&quot;https://twitter.com/samuel_colvin/status/1626237293618147329&quot;&gt;successful seed funding&lt;/a&gt;, there’s plenty of reason to believe there’s a game changer in the works.&lt;/p&gt;
&lt;p&gt;In his announcement, Colvin compares the current state of &lt;strong&gt;cloud services&lt;/strong&gt; to that of a tractor fifteen years after its invention. In both cases, the technology gets the job done, but without much consideration for the person in the driver’s seat.&lt;/p&gt;
&lt;p&gt;Colvin’s new company builds on what pydantic has learned about putting developer experience and expertise first. The exact details of this new venture are still under wraps, but it sets out to answer these questions:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What if we could build a platform with the best of all worlds? Taking the final step in reducing the boilerplate and busy-work of building web applications — allowing developers to write nothing more than the core logic which makes their application unique and valuable? (&lt;a href=&quot;https://pydantic.dev/announcement/&quot;&gt;Source&lt;/a&gt;)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This doesn’t mean that the open-source project is going anywhere. In fact, &lt;a href=&quot;https://docs.pydantic.dev/blog/pydantic-v2/&quot;&gt;pydantic V2&lt;/a&gt; is on its way and will be around seventeen times faster than V1, thanks to being rewritten in &lt;a href=&quot;https://www.rust-lang.org/&quot;&gt;Rust&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;To stay on up to date on what’s happening with pydantic’s new venture, subscribe to the &lt;a href=&quot;https://github.com/pydantic/pydantic/issues/5063&quot;&gt;GitHub issue&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python-news-february-2023/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-news-february-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 #148: Sharing Your Python App Across Platforms With BeeWare</title>
      <id>https://realpython.com/podcasts/rpp/148/</id>
      <link href="https://realpython.com/podcasts/rpp/148/"/>
      <updated>2023-03-10T12:00:00+00:00</updated>
      <summary>Are you interested in deploying your Python project everywhere? This week on the show, Russell Keith-Magee, founder and maintainer of the BeeWare project, returns. Russell shares recent updates to Briefcase, a tool that converts a Python application into native installers on macOS, Windows, Linux, and mobile devices.</summary>
      <content type="html">
        &lt;p&gt;Are you interested in deploying your Python project everywhere? This week on the show, Russell Keith-Magee, founder and maintainer of the BeeWare project, returns. Russell shares recent updates to Briefcase, a tool that converts a Python application into native installers on macOS, Windows, Linux, and mobile devices.&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 Mutable vs Immutable Types: What&#x27;s the Difference?</title>
      <id>https://realpython.com/python-mutable-vs-immutable-types/</id>
      <link href="https://realpython.com/python-mutable-vs-immutable-types/"/>
      <updated>2023-03-08T14:00:00+00:00</updated>
      <summary>In this tutorial, you&#x27;ll learn how Python mutable and immutable data types work internally and how you can take advantage of mutability or immutability to power your code.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;As a Python developer, you’ll have to deal with &lt;strong&gt;mutable&lt;/strong&gt; and &lt;strong&gt;immutable&lt;/strong&gt; objects sooner or later. Mutable objects are those that allow you to change their value or data in place without affecting the object’s identity. In contrast, immutable objects don’t allow this kind of operation. You’ll just have the option of creating new objects of the same type with different values.&lt;/p&gt;
&lt;p&gt;In Python, mutability is a characteristic that may profoundly influence your decision when choosing which data type to use in solving a given programming problem. Therefore, you need to know how mutable and immutable objects work in Python.&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;Understand how &lt;strong&gt;mutability&lt;/strong&gt; and &lt;strong&gt;immutability&lt;/strong&gt; work under the hood in Python&lt;/li&gt;
&lt;li&gt;Explore immutable and mutable &lt;strong&gt;built-in data types&lt;/strong&gt; in Python&lt;/li&gt;
&lt;li&gt;Identify and avoid some common &lt;strong&gt;mutability-related gotchas&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Understand and control how mutability affects your &lt;strong&gt;custom classes&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To dive smoothly into this fundamental Python topic, you should be familiar with how &lt;a href=&quot;https://realpython.com/python-variables/&quot;&gt;variables&lt;/a&gt; work in Python. You should also know the basics of Python’s built-in &lt;a href=&quot;https://realpython.com/python-data-types/&quot;&gt;data types&lt;/a&gt;, such as &lt;a href=&quot;https://realpython.com/python-numbers/&quot;&gt;numbers&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python-strings/&quot;&gt;strings&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python-lists-tuples/&quot;&gt;tuples, lists&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python-dicts/&quot;&gt;dictionaries&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python-sets/&quot;&gt;sets&lt;/a&gt;, and others. Finally, knowing how &lt;a href=&quot;https://realpython.com/python3-object-oriented-programming/&quot;&gt;object-oriented programming&lt;/a&gt; works in Python is also a good starting point.&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown=&quot;1&quot;&gt;Free Sample Code:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/python-mutable-vs-immutable-types-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-python-mutable-vs-immutable-types-code&quot; data-focus=&quot;false&quot; markdown=&quot;1&quot;&gt;Click here to download the free sample code&lt;/a&gt; that you’ll use to explore mutable vs immutable data types in Python.&lt;/p&gt;
&lt;/div&gt;
&lt;h2 id=&quot;mutability-vs-immutability&quot;&gt;Mutability vs Immutability&lt;a class=&quot;headerlink&quot; href=&quot;#mutability-vs-immutability&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;In programming, you have an &lt;strong&gt;immutable object&lt;/strong&gt; if you can’t change the object’s &lt;a href=&quot;https://en.wikipedia.org/wiki/State_(computer_science)&quot;&gt;state&lt;/a&gt; after you’ve created it. In contrast, a &lt;strong&gt;mutable object&lt;/strong&gt; allows you to modify its internal state after creation. In short, whether you’re able to change an object’s state or contained data is what defines if that object is mutable or immutable.&lt;/p&gt;
&lt;p&gt;Immutable objects are common in &lt;a href=&quot;https://realpython.com/python-functional-programming/&quot;&gt;functional programming&lt;/a&gt;, while mutable objects are widely used in &lt;a href=&quot;https://realpython.com/python3-object-oriented-programming/&quot;&gt;object-oriented programming&lt;/a&gt;. Because Python is a multiparadigm programming language, it provides mutable and immutable objects for you to choose from when solving a problem.&lt;/p&gt;
&lt;p&gt;To understand how mutable and immutable objects work in Python, you first need to understand a few related concepts. To kick things off, you’ll take a look at variables and objects.&lt;/p&gt;
&lt;h3 id=&quot;variables-and-objects&quot;&gt;Variables and Objects&lt;a class=&quot;headerlink&quot; href=&quot;#variables-and-objects&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;In Python, &lt;a href=&quot;https://realpython.com/python-variables/&quot;&gt;variables&lt;/a&gt; don’t have an associated type or size, as they’re labels attached to objects in memory. They point to the memory position where concrete objects live. In other words, a Python variable is a name that &lt;em&gt;refers to&lt;/em&gt; or holds a &lt;em&gt;reference to&lt;/em&gt; a concrete object. In contrast, Python &lt;strong&gt;objects&lt;/strong&gt; are concrete pieces of information that live in specific memory positions on your computer.&lt;/p&gt;
&lt;p&gt;The main takeaway here is that variables and objects are two different animals in Python:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Variables&lt;/strong&gt; hold references to objects.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Objects&lt;/strong&gt; live in concrete memory positions.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Both concepts are independent of each other. However, they’re closely related. Once you’ve created a variable with an &lt;a href=&quot;https://realpython.com/python-assignment-operator/&quot;&gt;assignment statement&lt;/a&gt;, then you can access the referenced object throughout your code by using the variable name. If the referenced object is mutable, then you can also perform &lt;strong&gt;mutations&lt;/strong&gt; on it through the variable. Mutability or immutability is intrinsic to objects rather than to variables.&lt;/p&gt;
&lt;p&gt;However, if the referenced object is immutable, then you won’t be able to change its internal state or contained data. You’ll just be able to make your variable reference a different object that, in Python, may or may not be of the same type as your original object.&lt;/p&gt;
&lt;p&gt;If you don’t have a reference (variable) to an object, then you can’t access that object in your code. If you lose or remove all the references to a given object, then Python will &lt;a href=&quot;https://docs.python.org/3/glossary.html#term-garbage-collection&quot;&gt;garbage-collect&lt;/a&gt; that object, freeing the memory for later use.&lt;/p&gt;
&lt;p&gt;Now that you know that there are differences between variables and objects, you need to learn that all Python objects have three core properties: identity, type, and value.&lt;/p&gt;
&lt;h3 id=&quot;objects-value-identity-and-type&quot;&gt;Objects, Value, Identity, and Type&lt;a class=&quot;headerlink&quot; href=&quot;#objects-value-identity-and-type&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;In Python, everything is an object. For example, &lt;a href=&quot;https://realpython.com/python-numbers/&quot;&gt;numbers&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python-strings/&quot;&gt;strings&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/defining-your-own-python-function/&quot;&gt;functions&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python3-object-oriented-programming/#define-a-class-in-python&quot;&gt;classes&lt;/a&gt;, and &lt;a href=&quot;https://realpython.com/python-modules-packages/&quot;&gt;modules&lt;/a&gt; are all objects. Every Python object has three core characteristics that define it at a foundational level. These characteristics are:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Value&lt;/li&gt;
&lt;li&gt;Identity&lt;/li&gt;
&lt;li&gt;Type&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Arguably, the &lt;strong&gt;value&lt;/strong&gt; is probably the most familiar object characteristic that you’ve dealt with. An object’s value consists of the concrete piece or pieces of &lt;strong&gt;data&lt;/strong&gt; contained in the object itself. A classic example is a numeric value like an &lt;a href=&quot;https://realpython.com/python-numbers/#integers&quot;&gt;integer&lt;/a&gt; or &lt;a href=&quot;https://realpython.com/python-numbers/#floating-point-numbers&quot;&gt;floating-point&lt;/a&gt; number:&lt;/p&gt;
&lt;div class=&quot;highlight python repl&quot;&gt;&lt;span class=&quot;repl-toggle&quot; title=&quot;Toggle REPL prompts and output&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&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;mi&quot;&gt;42&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;42&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;isinstance&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;42&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;True&lt;/span&gt;

&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;3.14&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;3.14&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;isinstance&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;3.14&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;float&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;True&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;These numeric values, &lt;code&gt;42&lt;/code&gt; and &lt;code&gt;3.14&lt;/code&gt;, are both objects. The first number is an instance of the built-in &lt;a href=&quot;https://docs.python.org/3/library/functions.html#int&quot;&gt;&lt;code&gt;int&lt;/code&gt;&lt;/a&gt; class, while the second is an instance of &lt;a href=&quot;https://docs.python.org/3/library/functions.html#float&quot;&gt;&lt;code&gt;float&lt;/code&gt;&lt;/a&gt;. In both examples, you confirm the object’s type using the built-in &lt;a href=&quot;https://docs.python.org/3/library/functions.html#isinstance&quot;&gt;&lt;code&gt;isinstance()&lt;/code&gt;&lt;/a&gt; function.&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 use the term &lt;strong&gt;value&lt;/strong&gt; to refer to an object’s data. Your objects will have custom and meaningful values only if you add those values yourself. Sometimes, you’ll create or find objects that don’t have meaningful values. However, all Python objects contain built-in attributes that also hold data. So, in a way, each Python object has an implicit value.&lt;/p&gt;
&lt;p&gt;For example, all Python objects will have &lt;a href=&quot;https://docs.python.org/3/glossary.html#term-special-method&quot;&gt;special methods&lt;/a&gt; and attributes that the language adds automatically under the hood:&lt;/p&gt;
&lt;div class=&quot;highlight python repl&quot;&gt;&lt;span class=&quot;repl-toggle&quot; title=&quot;Toggle REPL prompts and output&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;obj&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;object&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;dir&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;obj&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;[&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;    &#x27;__class__&#x27;,&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;    &#x27;__delattr__&#x27;,&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;    ...&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;    &#x27;__str__&#x27;,&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;    &#x27;__subclasshook__&#x27;&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;In this example, you created a generic object using the built-in &lt;a href=&quot;https://docs.python.org/3/library/functions.html#object&quot;&gt;&lt;code&gt;object&lt;/code&gt;&lt;/a&gt; class. You haven’t added any attributes to the object. So, from your programming perspective, this object doesn’t have a meaningful value. So, you may think it only has identity and type, which  you’ll explore in just a moment.&lt;/p&gt;
&lt;p&gt;However, because all objects have built-in attributes, you can mutate them by adding new attributes and data dynamically, as you’ll learn in the &lt;a href=&quot;#mutability-in-custom-classes&quot;&gt;Mutability in Custom Classes&lt;/a&gt; section of this tutorial.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python-mutable-vs-immutable-types/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-mutable-vs-immutable-types/ »&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>Manipulating ZIP Files With Python</title>
      <id>https://realpython.com/courses/zipfile-python/</id>
      <link href="https://realpython.com/courses/zipfile-python/"/>
      <updated>2023-03-07T16:40:12+00:00</updated>
      <summary>In this video course, you&#x27;ll learn how to manipulate ZIP files using Python&#x27;s zipfile module from the standard library. Through hands-on examples, you&#x27;ll learn how to read, write, compress, and extract files from your ZIP files quickly.</summary>
      <content type="html">
        &lt;p&gt;Python&amp;rsquo;s &lt;a href=&quot;https://docs.python.org/3/library/zipfile.html&quot;&gt;&lt;code&gt;zipfile&lt;/code&gt;&lt;/a&gt; is a standard-library module intended to manipulate &lt;strong&gt;ZIP files&lt;/strong&gt;. This file format is a widely adopted industry standard when it comes to archiving and compressing digital data. You can use it to package together several related files. It also allows you to reduce the size of your files and save disk space. Most importantly, it facilitates data exchange over computer networks.&lt;/p&gt;
&lt;p&gt;Knowing how to create, read, write, populate, extract, and list ZIP files using the &lt;code&gt;zipfile&lt;/code&gt; module is a useful skill to have as a Python developer or a DevOps engineer.&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;Read, write, and extract&lt;/strong&gt; files from ZIP files with Python&amp;rsquo;s &lt;code&gt;zipfile&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Read &lt;strong&gt;metadata&lt;/strong&gt; about the content of ZIP files using &lt;code&gt;zipfile&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;zipfile&lt;/code&gt; to &lt;strong&gt;manipulate member files&lt;/strong&gt; in existing ZIP files&lt;/li&gt;
&lt;li&gt;Create &lt;strong&gt;new ZIP files&lt;/strong&gt; to archive and compress files&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you commonly deal with ZIP files, then this knowledge can help to streamline your workflow to process your files confidently.&lt;/p&gt;
&lt;p&gt;To get the most out of this video course, you should know the basics of &lt;a href=&quot;https://realpython.com/courses/practical-recipes-files/&quot;&gt;working with files&lt;/a&gt;, using the &lt;a href=&quot;https://realpython.com/courses/with-statement-python/&quot;&gt;&lt;code&gt;with&lt;/code&gt; statement&lt;/a&gt;, handling file system paths with &lt;a href=&quot;https://realpython.com/courses/pathlib-python/&quot;&gt;&lt;code&gt;pathlib&lt;/code&gt;&lt;/a&gt;, and working with classes and &lt;a href=&quot;https://realpython.com/courses/intro-object-oriented-programming-oop-python/&quot;&gt;object-oriented programming&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If you&amp;rsquo;d like to learn more about the REPL used in this course, check out &lt;a href=&quot;https://realpython.com/bpython-alternative-python-repl/&quot;&gt;Discover bpython: A Python REPL With IDE-Like Features&lt;/a&gt;. Note that all the code in this course will also run in the &lt;a href=&quot;https://realpython.com/python-repl/&quot;&gt;Python standard REPL&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>What&#x27;s a Python Namespace Package, and What&#x27;s It For?</title>
      <id>https://realpython.com/python-namespace-package/</id>
      <link href="https://realpython.com/python-namespace-package/"/>
      <updated>2023-03-06T14:00:00+00:00</updated>
      <summary>In this tutorial, you&#x27;ll be exploring Python namespace packages: what they are, what they&#x27;re for, and how you can use them in your package systems. Along the way, you&#x27;ll create your own set of namespace packages and explore how you might be able to use them in your own projects.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Python &lt;strong&gt;namespace packages&lt;/strong&gt; are an advanced Python feature. You may have heard them mentioned in relation to the &lt;code&gt;__init__.py&lt;/code&gt; file. Specifically, if you &lt;em&gt;don’t&lt;/em&gt; include at least an empty &lt;code&gt;__init__.py&lt;/code&gt; file in your package, then your package becomes a namespace package.&lt;/p&gt;
&lt;p&gt;For the most part, namespace packages and &lt;strong&gt;regular packages&lt;/strong&gt; won’t behave differently when it comes to using them in your project. In fact, you’ve probably accidentally forgotten to include an &lt;code&gt;__init__.py&lt;/code&gt; file in at least one package but didn’t notice any side effects. While namespace packages are generally a bit slower to &lt;strong&gt;import&lt;/strong&gt; than regular packages, you won’t usually run into many issues.&lt;/p&gt;
&lt;p&gt;In this tutorial, you’ll dive into what Python namespace packages are, where they come from, why they’re created when you don’t include an &lt;code&gt;__init__.py&lt;/code&gt; file, and when they might be useful.&lt;/p&gt;
&lt;p&gt;Along the way, you’ll get the chance to make your own namespace package structures, and you’ll &lt;strong&gt;install&lt;/strong&gt; and &lt;strong&gt;extend&lt;/strong&gt; an experimental namespace package from &lt;a href=&quot;https://realpython.com/pypi-publish-python-package/&quot;&gt;PyPI&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Python namespace packages are probably going to be useful for people who manage or &lt;a href=&quot;https://en.wikipedia.org/wiki/Software_architecture&quot;&gt;architect&lt;/a&gt; collections of related packages. That said, you’ll get to experiment with a project that can make namespace packages more accessible to the average user.&lt;/p&gt;
&lt;p&gt;This is an advanced tutorial, and to get the most out of it, you should be very familiar with the &lt;a href=&quot;https://realpython.com/tutorials/basics/&quot;&gt;basics&lt;/a&gt; of Python and comfortable with the &lt;a href=&quot;https://realpython.com/python-import/&quot;&gt;import&lt;/a&gt; system, as well as having some exposure to &lt;a href=&quot;https://realpython.com/pypi-publish-python-package/&quot;&gt;packaging&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;So, &lt;strong&gt;what’s a Python namespace package, and what’s it for?&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown=&quot;1&quot;&gt;Free Source Code:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/python-namespace-package-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-python-namespace-package-code&quot; data-focus=&quot;false&quot; markdown=&quot;1&quot;&gt;Click here to download the free source code&lt;/a&gt; that you’ll use to explore Python namespace packages.&lt;/p&gt;
&lt;/div&gt;
&lt;h2 id=&quot;in-short-python-namespace-packages-are-a-way-to-organize-multiple-packages&quot;&gt;In Short: Python Namespace Packages Are a Way to Organize Multiple Packages&lt;a class=&quot;headerlink&quot; href=&quot;#in-short-python-namespace-packages-are-a-way-to-organize-multiple-packages&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;By way of a quick recap, you’ll first examine the general concept of a Python &lt;a href=&quot;https://realpython.com/python-namespaces-scope/&quot;&gt;&lt;strong&gt;namespace&lt;/strong&gt;&lt;/a&gt; before tackling namespace packages. A namespace is a way to group objects under a specific name. You can group values, &lt;a href=&quot;https://realpython.com/defining-your-own-python-function/&quot;&gt;functions&lt;/a&gt;, and other objects.&lt;/p&gt;
&lt;p&gt;For example, when you import &lt;code&gt;math&lt;/code&gt;, you gain access to the &lt;code&gt;math&lt;/code&gt; namespace. Inside the &lt;code&gt;math&lt;/code&gt; namespace, you can select from a whole host of different objects.&lt;/p&gt;
&lt;p&gt;You can also think of a &lt;a href=&quot;https://realpython.com/python-dicts/&quot;&gt;Python dictionary&lt;/a&gt; as a namespace. With a Python dictionary, you can take two &lt;a href=&quot;https://realpython.com/python-variables/&quot;&gt;variables&lt;/a&gt; that started out as completely separate, independent variables and include them within the same dictionary namespace:&lt;/p&gt;
&lt;div class=&quot;highlight python repl&quot;&gt;&lt;span class=&quot;repl-toggle&quot; title=&quot;Toggle REPL prompts and output&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;real_python&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{}&lt;/span&gt;

&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;home_page&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;https://realpython.com&quot;&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;import_tutorial&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;python-import&quot;&lt;/span&gt;

&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;real_python&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;home_page&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;home_page&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;real_python&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;import_tutorial&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;import_tutorial&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Now, you can reference both the &lt;code&gt;home_page&lt;/code&gt; and &lt;code&gt;import_tutorial&lt;/code&gt; values from the &lt;code&gt;real_python&lt;/code&gt; namespace. &lt;strong&gt;Namespace packages&lt;/strong&gt; work in a similar way, but they combine whole &lt;a href=&quot;https://realpython.com/python-modules-packages/#python-packages&quot;&gt;packages&lt;/a&gt; instead of values or other Python objects.&lt;/p&gt;
&lt;p&gt;This allows you to have two independent packages on &lt;strong&gt;PyPI&lt;/strong&gt;, for example, that still share the same namespace. One single namespace package doesn’t make a whole lot of sense. To really see the advantage of namespace packages, you need at least two packages.&lt;/p&gt;
&lt;p&gt;Namespace packages are typically used by businesses that may have extensive &lt;strong&gt;libraries&lt;/strong&gt; of packages that they want to keep under a company namespace. For example, the &lt;a href=&quot;https://learn.microsoft.com/en-us/azure/developer/python/sdk/azure-sdk-library-package-index&quot;&gt;Microsoft Azure packages&lt;/a&gt; are all accessible, once installed, through the &lt;code&gt;azure&lt;/code&gt; namespace.&lt;/p&gt;
&lt;p&gt;That’s why you’ll create your own company namespace in the next section.&lt;/p&gt;
&lt;h2 id=&quot;what-does-a-namespace-package-look-like&quot;&gt;What Does a Namespace Package Look Like?&lt;a class=&quot;headerlink&quot; href=&quot;#what-does-a-namespace-package-look-like&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Imagine you work for the Snake Corporation, and your team wants to make sure that all the packages in its library are always accessible from the &lt;code&gt;snake_corp&lt;/code&gt; namespace. So, no matter what package you’re using, as long as it was made by the Snake Corporation, you’ll import from &lt;code&gt;snake_corp&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Without namespace packages, you’d have two options:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Create a &lt;a href=&quot;https://en.wikipedia.org/wiki/Monorepo&quot;&gt;monorepo&lt;/a&gt;, which would be a single package called &lt;code&gt;snake_corp&lt;/code&gt; with hundreds of &lt;a href=&quot;https://realpython.com/python-modules-packages/#python-modules-overview&quot;&gt;modules&lt;/a&gt; for all the different libraries and utilities that you might need.&lt;/li&gt;
&lt;li&gt;Create various packages, but &lt;strong&gt;prefix&lt;/strong&gt; them all with &lt;code&gt;snake_corp&lt;/code&gt;. For example, you might have &lt;code&gt;snake_corp_dateutil&lt;/code&gt; as a package.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The trouble with creating a monorepo is that everyone has to download &lt;em&gt;all&lt;/em&gt; the code even if they only use a tiny fraction of it. It also complicates matters in terms of &lt;strong&gt;version management&lt;/strong&gt; and other packaging workflows, especially if different teams are in charge of different subpackages.&lt;/p&gt;
&lt;p&gt;The issue with creating various packages with a common prefix is that it can be quite verbose, messy, and inelegant. And, at the end of the day, the Snake Corporation CEO has said that they don’t like that solution. They’d prefer using a monorepo over prefixing all the packages. Besides, using common prefixes is just a &lt;strong&gt;convention&lt;/strong&gt; that doesn’t technically create a common namespace.&lt;/p&gt;
&lt;p&gt;What you have in this situation is a perfect use case for namespace packages! Namespace packages allow you to have multiple separate packages with their own packaging workflow, but they can all live in the same &lt;code&gt;snake_corp&lt;/code&gt; namespace.&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 the following examples, you’ll be creating a bunch of packages. You’ll note that the containing folders and the package names vary depending on whether you’re referring to the name for when you &lt;code&gt;pip install&lt;/code&gt; or import, for example. Check out this table for a rough breakdown of what’s generally used:&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;Purpose&lt;/th&gt;
&lt;th&gt;Typical Casing&lt;/th&gt;
&lt;th&gt;Example&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;PyPI and &lt;code&gt;pip&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Kebab&lt;/td&gt;
&lt;td&gt;&lt;code&gt;charset-normalizer&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Import&lt;/td&gt;
&lt;td&gt;Snake&lt;/td&gt;
&lt;td&gt;&lt;code&gt;charset_normalizer&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Prose&lt;/td&gt;
&lt;td&gt;Pascal or none&lt;/td&gt;
&lt;td&gt;Charset Normalizer&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;In the following examples, you’ll be using these conventions. But be aware that these conventions aren’t universal.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python-namespace-package/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-namespace-package/ »&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 #147: Django Deployment Strategies &amp; Preparing for PyCascades 2023</title>
      <id>https://realpython.com/podcasts/rpp/147/</id>
      <link href="https://realpython.com/podcasts/rpp/147/"/>
      <updated>2023-03-03T12:00:00+00:00</updated>
      <summary>Have you decided how you&#x27;re going to deploy your Django project? Should you use a VPS or a PaaS? Christopher Trudeau is back this week, bringing another batch of PyCoder&#x27;s Weekly articles and projects. We also have organizers from PyCascades to share details about this year&#x27;s hybrid in-person and virtual conference.</summary>
      <content type="html">
        &lt;p&gt;Have you decided how you&#x27;re going to deploy your Django project? Should you use a VPS or a PaaS? Christopher Trudeau is back this week, bringing another batch of PyCoder&#x27;s Weekly articles and projects. We also have organizers from PyCascades to share details about this year&#x27;s hybrid in-person and virtual conference.&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>Iterators and Iterables in Python: Run Efficient Iterations</title>
      <id>https://realpython.com/python-iterators-iterables/</id>
      <link href="https://realpython.com/python-iterators-iterables/"/>
      <updated>2023-03-01T14:00:00+00:00</updated>
      <summary>In this tutorial, you&#x27;ll learn what iterators and iterables are in Python. You&#x27;ll learn how they differ and when to use them in your code. You&#x27;ll also learn how to create your own iterators and iterables to make data processing more efficient.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Python’s &lt;strong&gt;iterators&lt;/strong&gt; and &lt;strong&gt;iterables&lt;/strong&gt; are two different but related tools that come in handy when you need to iterate over a data stream or container. Iterators power and control the iteration process, while iterables typically hold data that you want to iterate over one value at a time.&lt;/p&gt;
&lt;p&gt;Iterators and iterables are fundamental components of Python programming, and you’ll have to deal with them in almost all your programs. Learning how they work and how to create them is key for you as a Python developer.&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;iterators&lt;/strong&gt; using the &lt;strong&gt;iterator protocol&lt;/strong&gt; in Python&lt;/li&gt;
&lt;li&gt;Understand the &lt;strong&gt;differences&lt;/strong&gt; between iterators and iterables&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Work&lt;/strong&gt; with iterators and iterables in your Python code&lt;/li&gt;
&lt;li&gt;Use &lt;strong&gt;generator functions&lt;/strong&gt; and the &lt;strong&gt;&lt;code&gt;yield&lt;/code&gt; statement&lt;/strong&gt; to create &lt;strong&gt;generator iterators&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Build your own &lt;strong&gt;iterables&lt;/strong&gt; using different techniques, such as the &lt;strong&gt;iterable protocol&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Use the &lt;code&gt;asyncio&lt;/code&gt; module and the &lt;code&gt;await&lt;/code&gt; and &lt;code&gt;async&lt;/code&gt; keywords to create &lt;strong&gt;asynchronous iterators&lt;/strong&gt; &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Before diving deeper into these topics, you should be familiar with some core concepts like &lt;a href=&quot;https://realpython.com/python-for-loop/&quot;&gt;loops and iteration&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python3-object-oriented-programming/&quot;&gt;object-oriented programming&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/inheritance-composition-python/&quot;&gt;inheritance&lt;/a&gt;, &lt;a href=&quot;https://docs.python.org/3/glossary.html#term-special-method&quot;&gt;special methods&lt;/a&gt;, and &lt;a href=&quot;https://realpython.com/async-io-python/&quot;&gt;asynchronous programming&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;Free Sample Code:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/python-iterators-iterables-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-python-iterators-iterables-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 and create iterators and iterables for more efficient data processing.&lt;/p&gt;
&lt;/div&gt;
&lt;h2 id=&quot;understanding-iteration-in-python&quot;&gt;Understanding Iteration in Python&lt;a class=&quot;headerlink&quot; href=&quot;#understanding-iteration-in-python&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;When writing computer programs, you often need to repeat a given piece of code multiple times. To do this, you can follow one of the following approaches:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Repeating the target code as many times as you need in a sequence&lt;/li&gt;
&lt;li&gt;Putting the target code in a loop that runs as many times as you need&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The first approach has a few drawbacks. The most troublesome issue is the repetitive code itself, which is hard to maintain and not scalable. For example, the following code will print a greeting message on your screen three times:&lt;/p&gt;
&lt;div class=&quot;highlight python&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;c1&quot;&gt;# greeting.py&lt;/span&gt;

&lt;span class=&quot;nb&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Hello!&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Hello!&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Hello!&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;If you &lt;a href=&quot;https://realpython.com/run-python-scripts/&quot;&gt;run this script&lt;/a&gt;, then you’ll get &lt;code&gt;&#x27;Hello!&#x27;&lt;/code&gt; printed on your screen three times. This code works. However, what if you decide to update your code to print &lt;code&gt;&#x27;Hello, World!&#x27;&lt;/code&gt; instead of just &lt;code&gt;&#x27;Hello!&#x27;&lt;/code&gt;? In that case, you’ll have to update the greeting message three times, which is a maintenance burden.&lt;/p&gt;
&lt;p&gt;Now imagine a similar situation but with a larger and more complex piece of code. It can become a nightmare for maintainers.&lt;/p&gt;
&lt;p&gt;Using a loop will be a much better way to solve the problem and avoid the maintainability issue. Loops allow you to run a piece of code as often as you need. Consider how you’d write the above example using a &lt;code&gt;while&lt;/code&gt; loop:&lt;/p&gt;
&lt;div class=&quot;highlight python repl&quot;&gt;&lt;span class=&quot;repl-toggle&quot; title=&quot;Toggle REPL prompts and output&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;times&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;

&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;k&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;times&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;nb&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Hello!&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;n&quot;&gt;times&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;...&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;Hello!&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;Hello!&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;Hello!&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This &lt;code&gt;while&lt;/code&gt; loop runs as long as the loop-continuation condition (&lt;code&gt;times &amp;lt; 3&lt;/code&gt;) remains true. In each iteration, the loop prints your greeting message and increments the control variable, &lt;code&gt;times&lt;/code&gt;. Now, if you decide to update your message, then you just have to modify one line, which makes your code way more maintainable.&lt;/p&gt;
&lt;p&gt;Python’s &lt;code&gt;while&lt;/code&gt; loop supports what’s known as &lt;a href=&quot;https://realpython.com/python-while-loop/&quot;&gt;indefinite iteration&lt;/a&gt;, which means executing the same block of code over and over again, a potentially undefined number of times.&lt;/p&gt;
&lt;p&gt;You’ll also find a different but similar type of iteration known as &lt;a href=&quot;https://realpython.com/python-for-loop/&quot;&gt;definite iteration&lt;/a&gt;, which means going through the same code a predefined number of times. This kind of iteration is especially useful when you need to iterate over the items of a data stream one by one in a loop.&lt;/p&gt;
&lt;p&gt;To run an iteration like this, you typically use a &lt;code&gt;for&lt;/code&gt; loop in Python:&lt;/p&gt;
&lt;div class=&quot;highlight python repl&quot;&gt;&lt;span class=&quot;repl-toggle&quot; title=&quot;Toggle REPL prompts and output&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;numbers&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;

&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;number&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;numbers&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;nb&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;number&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;...&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;1&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;2&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;3&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;4&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;5&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;In this example, the &lt;code&gt;numbers&lt;/code&gt; &lt;a href=&quot;https://realpython.com/python-lists-tuples/&quot;&gt;list&lt;/a&gt; represents your stream of data, which you’ll generically refer to as an &lt;a href=&quot;#getting-to-know-python-iterables&quot;&gt;iterable&lt;/a&gt; because you can iterate over it, as you’ll learn later in this tutorial. The loop goes over each value in &lt;code&gt;numbers&lt;/code&gt; and prints it to your screen.&lt;/p&gt;
&lt;p&gt;When you use a &lt;code&gt;while&lt;/code&gt; or &lt;code&gt;for&lt;/code&gt; loop to repeat a piece of code several times, you’re actually running an &lt;strong&gt;iteration&lt;/strong&gt;. That’s the name given to the process itself.&lt;/p&gt;
&lt;p&gt;In Python, if your iteration process requires going through the values or items in a data collection one item at a time, then you’ll need another piece to complete the puzzle. You’ll need an &lt;strong&gt;iterator&lt;/strong&gt;.&lt;/p&gt;
&lt;h2 id=&quot;getting-to-know-python-iterators&quot;&gt;Getting to Know Python Iterators&lt;a class=&quot;headerlink&quot; href=&quot;#getting-to-know-python-iterators&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Iterators were added to Python &lt;a href=&quot;https://docs.python.org/3/whatsnew/2.2.html#pep-234-iterators&quot;&gt;2.2&lt;/a&gt; through &lt;a href=&quot;https://peps.python.org/pep-0234/&quot;&gt;PEP 234&lt;/a&gt;. They were a significant addition to the language because they unified the iteration process and &lt;a href=&quot;https://en.wikipedia.org/wiki/Abstraction_(computer_science)&quot;&gt;abstracted&lt;/a&gt; it away from the actual implementation of collection or &lt;a href=&quot;https://en.wikipedia.org/wiki/Container_(data_structure)&quot;&gt;container&lt;/a&gt; data types. This abstraction allows iteration over unordered collections, such as sets, ensuring every element is visited exactly once.&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python-iterators-iterables/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-iterators-iterables/ »&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>Writing Clean, Pythonic Code With namedtuple</title>
      <id>https://realpython.com/courses/python-namedtuple/</id>
      <link href="https://realpython.com/courses/python-namedtuple/"/>
      <updated>2023-02-28T14:00:00+00:00</updated>
      <summary>In this video course, you&#x27;ll learn what Python&#x27;s namedtuple is and how to use it in your code. You&#x27;ll also learn about the main differences between named tuples and other data structures, such as dictionaries, data classes, and typed named tuples.</summary>
      <content type="html">
        &lt;p&gt;Python&amp;rsquo;s &lt;a href=&quot;https://docs.python.org/3/library/collections.html#module-collections&quot;&gt;&lt;code&gt;collections&lt;/code&gt;&lt;/a&gt; module provides a &lt;a href=&quot;https://en.wikipedia.org/wiki/Factory_(object-oriented_programming)&quot;&gt;factory function&lt;/a&gt; called &lt;a href=&quot;https://docs.python.org/3/library/collections.html#collections.namedtuple&quot;&gt;&lt;code&gt;namedtuple()&lt;/code&gt;&lt;/a&gt;, which is specially designed to make your code more &lt;strong&gt;Pythonic&lt;/strong&gt; when you&amp;rsquo;re working with tuples. With &lt;code&gt;namedtuple()&lt;/code&gt;, you can create &lt;a href=&quot;https://docs.python.org/3/glossary.html#term-immutable&quot;&gt;immutable&lt;/a&gt; sequence types that allow you to access their values using descriptive field names and the &lt;strong&gt;dot notation&lt;/strong&gt; instead of unclear integer indices.&lt;/p&gt;
&lt;p&gt;If you have some experience using Python, then you know that writing Pythonic code is a core skill for Python developers. In this video course, you&amp;rsquo;ll level up that skill using &lt;code&gt;namedtuple&lt;/code&gt;.&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;Create &lt;code&gt;namedtuple&lt;/code&gt; classes using &lt;strong&gt;&lt;code&gt;namedtuple()&lt;/code&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Identify and take advantage of &lt;strong&gt;cool features&lt;/strong&gt; of &lt;code&gt;namedtuple&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;namedtuple&lt;/code&gt; instances to write &lt;strong&gt;Pythonic code&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Decide whether to use a &lt;code&gt;namedtuple&lt;/code&gt; or a &lt;strong&gt;similar data structure&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Subclass&lt;/strong&gt; a &lt;code&gt;namedtuple&lt;/code&gt; to provide new features&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To get the most out of this course, you need to have a general understanding of Python&amp;rsquo;s philosophy related to &lt;a href=&quot;https://realpython.com/learning-paths/writing-pythonic-code/&quot;&gt;writing Pythonic and readable code&lt;/a&gt;. You also need to know the basics of working with:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/python-lists-tuples/&quot;&gt;Tuples&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/python-dicts/&quot;&gt;Dictionaries&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/python3-object-oriented-programming/&quot;&gt;Classes and object-oriented programming&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/python-data-classes/&quot;&gt;Data classes&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you don&amp;rsquo;t have all the required knowledge before starting this video course, then that&amp;rsquo;s okay! You can stop and review the above resources as needed.&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 NumPy reshape() to Change the Shape of an Array</title>
      <id>https://realpython.com/numpy-reshape/</id>
      <link href="https://realpython.com/numpy-reshape/"/>
      <updated>2023-02-27T14:00:00+00:00</updated>
      <summary>In this tutorial, you&#x27;ll learn how to use NumPy reshape() to rearrange the data in an array. You&#x27;ll learn to increase and decrease the number of dimensions and to configure the data in the new array to suit your requirements.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;The main data structure that you’ll use in &lt;a href=&quot;https://realpython.com/numpy-tutorial/&quot;&gt;NumPy&lt;/a&gt; is the &lt;a href=&quot;https://numpy.org/doc/stable/reference/arrays.ndarray.html&quot;&gt;N-dimensional array&lt;/a&gt;. An array can have one or more dimensions to structure your data. In some programs, you may need to change how you organize your data within a NumPy array. You can use NumPy’s &lt;strong&gt;&lt;code&gt;reshape()&lt;/code&gt;&lt;/strong&gt; to rearrange the data.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&quot;https://numpy.org/doc/stable/glossary.html#term-shape&quot;&gt;shape&lt;/a&gt; of an array describes the number of dimensions in the array and the length of each dimension. In this tutorial, you’ll learn how to change the shape of a NumPy array to place all its data in a different configuration. When you complete this tutorial, you’ll be able to alter the shape of any array to suit your application’s needs.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this tutorial, you’ll learn how to:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Change the shape&lt;/strong&gt; of a NumPy array without changing its number of dimensions&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Add and remove dimensions&lt;/strong&gt; in a NumPy array&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Control how data is rearranged&lt;/strong&gt; when reshaping an array with the &lt;code&gt;order&lt;/code&gt; parameter&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Use a wildcard value&lt;/strong&gt; of &lt;code&gt;-1&lt;/code&gt; for one of the dimensions in &lt;code&gt;reshape()&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For this tutorial, you should be familiar with the basics of NumPy and N-dimensional arrays. You can read &lt;a href=&quot;https://realpython.com/numpy-tutorial/&quot;&gt;NumPy Tutorial: Your First Steps Into Data Science in Python&lt;/a&gt; to learn more about NumPy before diving in.&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;Supplemental Material:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/numpy-reshape-repository/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-numpy-reshape-repository&quot; data-focus=&quot;false&quot; markdown=&quot;1&quot;&gt;Click here to download the image repository&lt;/a&gt; that you’ll use with NumPy &lt;code&gt;reshape()&lt;/code&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;h2 id=&quot;install-numpy&quot;&gt;Install NumPy&lt;a class=&quot;headerlink&quot; href=&quot;#install-numpy&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;You’ll need to install NumPy to your environment to run the code in this tutorial and explore &lt;code&gt;reshape()&lt;/code&gt;. You can install the package using &lt;a href=&quot;https://realpython.com/what-is-pip/&quot;&gt;&lt;code&gt;pip&lt;/code&gt;&lt;/a&gt; within a &lt;a href=&quot;https://realpython.com/python-virtual-environments-a-primer/&quot;&gt;virtual environment&lt;/a&gt;. Select either the Windows or Linux + macOS tab below to see instructions for your operating system:&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;i class=&quot;fa fa-windows text-muted mr-1&quot; aria-hidden=&quot;true&quot;&gt;&lt;/i&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;i class=&quot;fa fa-linux text-muted mr-1&quot; aria-hidden=&quot;true&quot;&gt;&lt;/i&gt;&lt;i class=&quot;fa fa-apple text-muted mr-1&quot; aria-hidden=&quot;true&quot;&gt;&lt;/i&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;highlight pscon&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;PS&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;python&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;-m&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;venv&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;venv&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;PS&amp;gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.\&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;venv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;\&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Scripts&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;\&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;activate&lt;/span&gt;
&lt;span class=&quot;gp gp-VirtualEnv&quot;&gt;(venv)&lt;/span&gt; &lt;span class=&quot;gp&quot;&gt;PS&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;python&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;-m&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pip&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;install&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;numpy&lt;/span&gt;
&lt;/code&gt;&lt;/pre&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;highlight sh&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 -m venv venv
&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;source&lt;/span&gt; venv/bin/activate
&lt;span class=&quot;gp gp-VirtualEnv&quot;&gt;(venv)&lt;/span&gt; &lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;python -m pip install numpy
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;It’s a convention to use the alias &lt;code&gt;np&lt;/code&gt; when you import NumPy. To get started, you can import NumPy in the &lt;a href=&quot;https://realpython.com/python-repl/&quot;&gt;Python REPL&lt;/a&gt;:&lt;/p&gt;
&lt;div class=&quot;highlight python repl&quot;&gt;&lt;span class=&quot;repl-toggle&quot; title=&quot;Toggle REPL prompts and output&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;numpy&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;np&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Now that you’ve installed NumPy and imported the package in a REPL environment, you’re ready to start working with NumPy arrays.  &lt;/p&gt;
&lt;h2 id=&quot;understand-the-shape-of-numpy-arrays&quot;&gt;Understand the Shape of NumPy Arrays&lt;a class=&quot;headerlink&quot; href=&quot;#understand-the-shape-of-numpy-arrays&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;You’ll use NumPy’s &lt;a href=&quot;https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html&quot;&gt;&lt;code&gt;ndarray&lt;/code&gt;&lt;/a&gt;  in this tutorial. In this section, you’ll review the key features of this data structure, including an array’s overall &lt;a href=&quot;https://numpy.org/doc/stable/glossary.html#term-shape&quot;&gt;shape&lt;/a&gt; and number of &lt;a href=&quot;https://numpy.org/doc/stable/glossary.html#term-axis&quot;&gt;dimensions&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You can create an array from a list of lists:&lt;/p&gt;
&lt;div class=&quot;highlight python repl&quot;&gt;&lt;span class=&quot;repl-toggle&quot; title=&quot;Toggle REPL prompts and output&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;numpy&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;np&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;numbers&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;np&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;array&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;([[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;6&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;mi&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]])&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;numbers&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;array([[1, 2, 3, 4],&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;       [5, 6, 7, 8]])&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The function &lt;a href=&quot;https://numpy.org/doc/stable/reference/generated/numpy.array.html&quot;&gt;&lt;code&gt;np.array()&lt;/code&gt;&lt;/a&gt; returns an object of type &lt;a href=&quot;https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html&quot;&gt;&lt;code&gt;np.ndarray&lt;/code&gt;&lt;/a&gt;. This data structure is the main data type in NumPy.&lt;/p&gt;
&lt;p&gt;You can describe the shape of an array using the length of each dimension of the array. NumPy represents this as a tuple of integers. The array &lt;code&gt;numbers&lt;/code&gt; has two rows and four columns. Therefore, this array has a &lt;code&gt;(2, 4)&lt;/code&gt; shape:&lt;/p&gt;
&lt;div class=&quot;highlight python repl&quot;&gt;&lt;span class=&quot;repl-toggle&quot; title=&quot;Toggle REPL prompts and output&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;numbers&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;shape&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;(2, 4)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;You can represent the same data using a different shape:&lt;/p&gt;
&lt;figure class=&quot;js-lightbox&quot;&gt;&lt;a href=&quot;https://files.realpython.com/media/numpy-reshape-24-42.679add5e8d11.png&quot; target=&quot;_blank&quot;&gt;&lt;img loading=&quot;lazy&quot; class=&quot;img-fluid mx-auto d-block &quot; src=&quot;https://files.realpython.com/media/numpy-reshape-24-42.679add5e8d11.png&quot; width=&quot;800&quot; height=&quot;800&quot; srcset=&quot;https://robocrop.realpython.net/?url=https%3A//files.realpython.com/media/numpy-reshape-24-42.679add5e8d11.png&amp;amp;w=200&amp;amp;sig=fe6792f8865ca498a6b77f2d8d48bd9d5e6b9837 200w, https://robocrop.realpython.net/?url=https%3A//files.realpython.com/media/numpy-reshape-24-42.679add5e8d11.png&amp;amp;w=266&amp;amp;sig=9779c6c91acaa0b8f6226c76e8a43b489ee1b2e5 266w, https://robocrop.realpython.net/?url=https%3A//files.realpython.com/media/numpy-reshape-24-42.679add5e8d11.png&amp;amp;w=400&amp;amp;sig=9b7ffac39d35910b9ad305fdfa5c40a803f2955a 400w, https://files.realpython.com/media/numpy-reshape-24-42.679add5e8d11.png 800w&quot; sizes=&quot;(min-width: 1200px) 690px, (min-width: 780px) calc(-5vw + 669px), (min-width: 580px) 510px, calc(100vw - 30px)&quot; alt=&quot;Visual representation of NumPy arrays with different shapes&quot; data-asset=&quot;4894&quot;&gt;&lt;/a&gt;&lt;/figure&gt;

&lt;p&gt;Both of these arrays contain the same data. The array with the shape &lt;code&gt;(2, 4)&lt;/code&gt; has two rows and four columns and the array with the shape &lt;code&gt;(4, 2)&lt;/code&gt; has four rows and two columns. You can check the number of dimensions of an array using &lt;code&gt;.ndim&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&quot;highlight python repl&quot;&gt;&lt;span class=&quot;repl-toggle&quot; title=&quot;Toggle REPL prompts and output&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;numbers&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ndim&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;2&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The array &lt;code&gt;numbers&lt;/code&gt; is two-dimensional (2D). You can arrange the same data contained in &lt;code&gt;numbers&lt;/code&gt; in arrays with a different number of dimensions:&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/numpy-reshape/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/numpy-reshape/ »&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 #146: Using NumPy and Linear Algebra for Faster Python Code</title>
      <id>https://realpython.com/podcasts/rpp/146/</id>
      <link href="https://realpython.com/podcasts/rpp/146/"/>
      <updated>2023-02-24T12:00:00+00:00</updated>
      <summary>Are you still using loops and lists to process your data in Python? Have you heard of a Python library with optimized data structures and built-in operations that can speed up your data science code? This week on the show, Jodie Burchell, developer advocate for data science at JetBrains, returns to share secrets for harnessing linear algebra and NumPy for your projects.</summary>
      <content type="html">
        &lt;p&gt;Are you still using loops and lists to process your data in Python? Have you heard of a Python library with optimized data structures and built-in operations that can speed up your data science code? This week on the show, Jodie Burchell, developer advocate for data science at JetBrains, returns to share secrets for harnessing linear algebra and NumPy for your projects.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Terminal: First Steps and Useful Commands</title>
      <id>https://realpython.com/terminal-commands/</id>
      <link href="https://realpython.com/terminal-commands/"/>
      <updated>2023-02-22T14:00:00+00:00</updated>
      <summary>The terminal is an essential tool in your journey as a Python developer.
This tutorial helps you to get started with the terminal, pip, and Git by showcasing interesting commands that you can incorporate into your workflow.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;The terminal can be intimidating to work with when you’re used to working with graphical user interfaces (GUIs). However, it’s an important tool that you need to get used to in your journey as a Python developer.
And once you level up your skill of using the terminal, it becomes an extremely powerful tool in your repertoire. With just a few commands in the terminal, you can do tasks that are impossible or at least very tedious to do in a GUI.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this tutorial, you’ll learn how to:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Find the terminal&lt;/strong&gt; on your operating system&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Open the terminal&lt;/strong&gt; for the first time&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Navigate your file system&lt;/strong&gt; with basic commans&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Create files and folders&lt;/strong&gt; with the terminal&lt;/li&gt;
&lt;li&gt;Manage packages with &lt;strong&gt;&lt;code&gt;pip&lt;/code&gt; commands&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Keep track of your files with &lt;strong&gt;Git in the terminal&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you’re new to working with the terminal, or you’re looking to expand your understanding of its capabilities, then this tutorial is a great starting point. In it, you’ll get an introduction to some of the basic commands and learn how to use &lt;code&gt;pip&lt;/code&gt; and Git to manage your projects in the terminal. &lt;/p&gt;
&lt;p&gt;Understanding how to integrate the terminal, &lt;code&gt;pip&lt;/code&gt;, and Git into your workflows is essential for you as a Python developer. 
However, it’s important to note that you’ll only scratch the surface of what the terminal can do, and there’s much more to learn as you continue to explore the terminal as an essential development tool.&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown=&quot;1&quot;&gt;Free Download:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/terminal-commands-cheat-sheet/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-terminal-commands-cheat-sheet&quot; data-focus=&quot;false&quot; markdown=&quot;1&quot;&gt;Click here to get a free cheat sheet&lt;/a&gt; of useful commands to get you started working with the terminal.&lt;/p&gt;
&lt;/div&gt;
&lt;h2 id=&quot;install-and-open-the-terminal&quot;&gt;Install and Open the Terminal&lt;a class=&quot;headerlink&quot; href=&quot;#install-and-open-the-terminal&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Back in the day, the term &lt;em&gt;terminal&lt;/em&gt; referred to &lt;a href=&quot;https://en.wikipedia.org/wiki/Computer_terminal&quot;&gt;some clunky hardware&lt;/a&gt; that you used to enter data into a computer.
Nowadays, people are usually talking about a &lt;a href=&quot;https://en.wikipedia.org/wiki/terminal_emulator&quot;&gt;terminal emulator&lt;/a&gt; when they say &lt;strong&gt;terminal&lt;/strong&gt;, and they mean some kind of terminal software that you can find on most modern computers. &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; There are two other terms that you might hear now and then in combination with the terminal:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;A &lt;strong&gt;shell&lt;/strong&gt; is the program that you interact with when running commands in a terminal.&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;command-line interface (CLI)&lt;/strong&gt; is a program designed to run in a shell inside the terminal.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;In other words, the shell provides the commands that you use in a command-line interface, and the terminal is the application that you run to access the shell.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;If you’re using a Linux or macOS machine, then the terminal is already built in.
You can start using it right away.&lt;/p&gt;
&lt;p&gt;On Windows, you also have access to command-line applications like the &lt;a href=&quot;https://en.wikipedia.org/wiki/Cmd.exe&quot;&gt;Command Prompt&lt;/a&gt;.
However, for this tutorial and terminal work in general, you should use the Windows terminal application instead. &lt;/p&gt;
&lt;p&gt;Read on to learn how to install and open the terminal on Windows and how to find the terminal on Linux and macOS.&lt;/p&gt;
&lt;h3 id=&quot;windows&quot;&gt;Windows&lt;a class=&quot;headerlink&quot; href=&quot;#windows&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The &lt;strong&gt;Windows terminal&lt;/strong&gt; is a modern and feature-rich application that gives you access to the command line, multiple shells, and advanced customization options.
If you have Windows 11 or above, chances are that the Windows terminal is already present on your machine. 
Otherwise, you can download the application from the &lt;a href=&quot;https://apps.microsoft.com/store/detail/windows-terminal/9N0DX20HK701&quot;&gt;Microsoft Store&lt;/a&gt; or from the official &lt;a href=&quot;https://github.com/microsoft/terminal&quot;&gt;GitHub repository&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Before continuing with this tutorial, you need to get the terminal working on your Windows computer.
You can follow the &lt;a href=&quot;https://realpython.com/python-coding-setup-windows/&quot;&gt;Your Python Coding Environment on Windows: Setup Guide&lt;/a&gt; to learn &lt;a href=&quot;https://realpython.com/python-coding-setup-windows/#installing-windows-terminal&quot;&gt;how to install the Windows terminal&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;After you install the Windows terminal, you can find it in the Start menu under &lt;em&gt;Terminal&lt;/em&gt;.
When you start the application, you should see a window that looks like this:&lt;/p&gt;
&lt;figure class=&quot;js-lightbox&quot;&gt;&lt;a href=&quot;https://files.realpython.com/media/win-10-setup-14-windows-powershell_-_cropped.f114376b1071.png&quot; target=&quot;_blank&quot;&gt;&lt;img loading=&quot;lazy&quot; class=&quot;img-fluid mx-auto d-block &quot; src=&quot;https://files.realpython.com/media/win-10-setup-14-windows-powershell_-_cropped.f114376b1071.png&quot; width=&quot;1024&quot; height=&quot;726&quot; srcset=&quot;https://robocrop.realpython.net/?url=https%3A//files.realpython.com/media/win-10-setup-14-windows-powershell_-_cropped.f114376b1071.png&amp;amp;w=256&amp;amp;sig=4c3ee571cd3620d957225bc6b4a59c0f2bbcbe2d 256w, https://robocrop.realpython.net/?url=https%3A//files.realpython.com/media/win-10-setup-14-windows-powershell_-_cropped.f114376b1071.png&amp;amp;w=341&amp;amp;sig=24b2c1140624d3c553c5108b2a21135533365fb9 341w, https://robocrop.realpython.net/?url=https%3A//files.realpython.com/media/win-10-setup-14-windows-powershell_-_cropped.f114376b1071.png&amp;amp;w=512&amp;amp;sig=ddd7cee1185bfbba047487f08ff8c17a511009f1 512w, https://files.realpython.com/media/win-10-setup-14-windows-powershell_-_cropped.f114376b1071.png 1024w&quot; sizes=&quot;(min-width: 1200px) 690px, (min-width: 780px) calc(-5vw + 669px), (min-width: 580px) 510px, calc(100vw - 30px)&quot; alt=&quot;Windows Terminal with Windows PowerShell tab&quot; data-asset=&quot;4454&quot;&gt;&lt;/a&gt;&lt;/figure&gt;

&lt;p&gt;It can be handy to create a desktop shortcut for the terminal or pin the application to your task bar for easier access.&lt;/p&gt;
&lt;h3 id=&quot;linux&quot;&gt;Linux&lt;a class=&quot;headerlink&quot; href=&quot;#linux&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;You can find the terminal application in the application menu of your Linux distribution. 
Alternatively, you can press &lt;span class=&quot;keys&quot;&gt;&lt;kbd class=&quot;key-control&quot;&gt;Ctrl&lt;/kbd&gt;&lt;span&gt;+&lt;/span&gt;&lt;kbd class=&quot;key-alt&quot;&gt;Alt&lt;/kbd&gt;&lt;span&gt;+&lt;/span&gt;&lt;kbd class=&quot;key-t&quot;&gt;T&lt;/kbd&gt;&lt;/span&gt; on your keyboard or use the application launcher and search for the word &lt;em&gt;Terminal&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;After opening the terminal, you should see a window similar to the screenshot below:&lt;/p&gt;
&lt;figure class=&quot;js-lightbox&quot;&gt;&lt;a href=&quot;https://files.realpython.com/media/linux-terminal.28e537154512.png&quot; target=&quot;_blank&quot;&gt;&lt;img loading=&quot;lazy&quot; class=&quot;img-fluid mx-auto d-block &quot; src=&quot;https://files.realpython.com/media/linux-terminal.28e537154512.png&quot; width=&quot;1186&quot; height=&quot;701&quot; srcset=&quot;https://robocrop.realpython.net/?url=https%3A//files.realpython.com/media/linux-terminal.28e537154512.png&amp;amp;w=296&amp;amp;sig=632da48d85fe0b133fc17109968b4edc6ece5300 296w, https://robocrop.realpython.net/?url=https%3A//files.realpython.com/media/linux-terminal.28e537154512.png&amp;amp;w=395&amp;amp;sig=f5412898d783d1ecae1324cc3df3c39fe3b2f35e 395w, https://robocrop.realpython.net/?url=https%3A//files.realpython.com/media/linux-terminal.28e537154512.png&amp;amp;w=593&amp;amp;sig=e274951177bdb772fb216871ba08c4b7a6b90e55 593w, https://files.realpython.com/media/linux-terminal.28e537154512.png 1186w&quot; sizes=&quot;(min-width: 1200px) 690px, (min-width: 780px) calc(-5vw + 669px), (min-width: 580px) 510px, calc(100vw - 30px)&quot; alt=&quot;Screenshot of the Linux terminal&quot; data-asset=&quot;4775&quot;&gt;&lt;/a&gt;&lt;/figure&gt;

&lt;p&gt;How you open the terminal may also depend on which Linux distribution you’re using. Each one has a different way of doing it.
If you have trouble opening the terminal on Linux, then the Real Python community will help you out in the comments below.&lt;/p&gt;
&lt;h3 id=&quot;macos&quot;&gt;macOS&lt;a class=&quot;headerlink&quot; href=&quot;#macos&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;A common way to open the terminal application on macOS is by opening the &lt;a href=&quot;https://support.apple.com/en-us/guide/mac-help/mchlp1008/mac&quot;&gt;Spotlight Search&lt;/a&gt; and searching for &lt;em&gt;Terminal&lt;/em&gt;.
You can also find the terminal app in the application folder inside Finder.&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/terminal-commands/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/terminal-commands/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Using the Terminal on Windows</title>
      <id>https://realpython.com/courses/using-terminal-windows/</id>
      <link href="https://realpython.com/courses/using-terminal-windows/"/>
      <updated>2023-02-21T14:00:00+00:00</updated>
      <summary>In this Code Conversation video course, you&#x27;ll learn how to use the terminal on Windows.
You&#x27;ll navigate the file system with Philipp and Ian and perform common tasks like creating files and folders. If you&#x27;ve never used the terminal before, then this video course will help you get started.</summary>
      <content type="html">
        &lt;p&gt;The &lt;strong&gt;terminal&lt;/strong&gt; can be intimidating to work with when you&amp;rsquo;re used to working with graphical user interfaces. However, it&amp;rsquo;s an important tool that you need to get used to in your journey as a Python developer.
Even though you can substitute some workflows in the terminal with apps that contain a graphical user interface (GUI), you may need to open the terminal at some point in your life as a Python developer.&lt;/p&gt;
&lt;p&gt;In this &lt;strong&gt;Code Conversation&lt;/strong&gt;, you&amp;rsquo;ll follow a chat between Philipp and Ian as they perform common tasks in the terminal on Windows, such as:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Showing the current working directory&lt;/li&gt;
&lt;li&gt;Listing the contents of a folder&lt;/li&gt;
&lt;li&gt;Adding text to files without opening them&lt;/li&gt;
&lt;li&gt;Displaying the content of a file&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Along the way, you&amp;rsquo;ll learn how to:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Find the terminal&lt;/strong&gt; on your operating system&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Open the terminal&lt;/strong&gt; for the first time&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Navigate your file system&lt;/strong&gt; with basic commands&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Create files and folders&lt;/strong&gt; with the terminal&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Run Python files&lt;/strong&gt; on Windows&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you&amp;rsquo;ve never worked with the terminal on Windows before or you want to see some interesting use cases to incorporate the terminal into your workflow, then this video course is the perfect start for you.&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>Develop Data Visualization Interfaces in Python With Dash</title>
      <id>https://realpython.com/python-dash/</id>
      <link href="https://realpython.com/python-dash/"/>
      <updated>2023-02-20T14:00:00+00:00</updated>
      <summary>In this tutorial, you&#x27;ll learn how to build a dashboard using Python and Dash. Dash is a framework for building data visualization interfaces. It helps data scientists build fully interactive web applications quickly.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;In the past, creating analytical web applications was a task for seasoned developers that required knowledge of multiple programming languages and frameworks. That’s no longer the case. Nowadays, you can make data visualization interfaces using pure Python. One popular tool for this is &lt;a href=&quot;https://dash.plotly.com/introduction&quot;&gt;Dash&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Dash gives data scientists the ability to showcase their results in interactive web applications. You don’t need to be an expert in &lt;a href=&quot;https://realpython.com/learning-paths/become-python-web-developer/&quot;&gt;web development&lt;/a&gt;. In an afternoon, you can build and deploy a Dash app to share with others.&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 a &lt;strong&gt;Dash application&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Use Dash &lt;strong&gt;core components&lt;/strong&gt; and &lt;strong&gt;HTML components&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Customize the style&lt;/strong&gt; of your Dash application&lt;/li&gt;
&lt;li&gt;Use &lt;strong&gt;callbacks&lt;/strong&gt; to build interactive applications&lt;/li&gt;
&lt;li&gt;Deploy your application on &lt;strong&gt;PythonAnywhere&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can download the source code, data, and resources for the sample application that you’ll make 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 the Source Code:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/dash-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-dash-code&quot; data-focus=&quot;false&quot; markdown=&quot;1&quot;&gt;Click here to get the source code you’ll use&lt;/a&gt; to learn about creating data visualization interfaces in Python with Dash in this tutorial.&lt;/p&gt;
&lt;/div&gt;
&lt;h2 id=&quot;what-is-dash&quot;&gt;What Is Dash?&lt;a class=&quot;headerlink&quot; href=&quot;#what-is-dash&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Dash is an open-source framework for building data visualization interfaces. Released in 2017 as a Python library, it’s grown to include implementations for R, Julia, and F#. Dash helps data scientists build analytical web applications without requiring advanced web development knowledge.&lt;/p&gt;
&lt;p&gt;Three technologies constitute the core of Dash:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Flask&lt;/strong&gt; supplies the web server functionality.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;React.js&lt;/strong&gt; renders the user interface of the web page.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Plotly.js&lt;/strong&gt; generates the charts used in your application.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;But you don’t have to worry about making all these technologies work together. Dash will do that for you. You just need to write Python, R, Julia, or F# and sprinkle in a bit of CSS.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://plotly.com/&quot;&gt;Plotly&lt;/a&gt;, a Canada-based company, built Dash and supports its development. You may know the company from the &lt;a href=&quot;https://plotly.com/graphing-libraries/&quot;&gt;popular graphing libraries&lt;/a&gt; that share its name. The company released Dash as open source under an &lt;a href=&quot;https://tldrlegal.com/license/mit-license&quot;&gt;MIT license&lt;/a&gt;, so you can use Dash at no cost.&lt;/p&gt;
&lt;p&gt;Plotly also offers a commercial companion to Dash called &lt;a href=&quot;https://plotly.com/dash/&quot;&gt;Dash Enterprise&lt;/a&gt;. This paid service provides companies with support services such as hosting, deploying, and handling authentication on Dash applications. But these features live outside of Dash’s open-source ecosystem.&lt;/p&gt;
&lt;p&gt;Dash will help you build dashboards quickly. If you’re used to analyzing data or building data visualizations using Python, then Dash will be a useful addition to your toolbox. Here are a few examples of what you can make with Dash:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://dash.gallery/self-driving/&quot;&gt;A dashboard showing object detection for self-driving cars&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://dash.gallery/dash-uber-rides-demo/&quot;&gt;A visualization of millions of Uber rides&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://dash.gallery/soccer-match-analytics/&quot;&gt;An interactive tool for analyzing soccer match data&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This is just a tiny sample. If you’d like to see other interesting use cases, then go check out the &lt;a href=&quot;https://dash.gallery/&quot;&gt;Dash App Gallery&lt;/a&gt;.&lt;/p&gt;
&lt;div class=&quot;alert alert-primary&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; You don’t need advanced knowledge of web development to follow this tutorial, but some familiarity with &lt;a href=&quot;https://realpython.com/html-css-python/&quot;&gt;HTML and CSS&lt;/a&gt; won’t hurt.&lt;/p&gt;
&lt;p&gt;You should know the basics of the following topics, though:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Python graphing libraries such as Plotly, &lt;a href=&quot;https://realpython.com/python-data-visualization-bokeh/&quot;&gt;Bokeh&lt;/a&gt;, and &lt;a href=&quot;https://realpython.com/python-matplotlib-guide/&quot;&gt;Matplotlib&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;HTML and the &lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Learn/HTML/Introduction_to_HTML/Getting_started&quot;&gt;structure of an HTML file&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Learn/CSS/First_steps/Getting_started&quot;&gt;CSS and style sheets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;p&gt;If you feel comfortable with the requirements and want to learn how to use Dash in your next project, then continue to the following section!&lt;/p&gt;
&lt;h2 id=&quot;get-started-with-dash-in-python&quot;&gt;Get Started With Dash in Python&lt;a class=&quot;headerlink&quot; href=&quot;#get-started-with-dash-in-python&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;In this tutorial, you’ll go through the end-to-end process of building a dashboard using Dash. If you follow along with the examples, then you’ll go from a bare-bones dashboard on your local machine to a styled dashboard deployed on &lt;a href=&quot;https://www.pythonanywhere.com/&quot;&gt;PythonAnywhere&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;To build the dashboard, you’ll use a &lt;a href=&quot;https://www.kaggle.com/neuromusic/avocado-prices&quot;&gt;dataset&lt;/a&gt; of sales and prices of avocados in the United States between 2015 and 2018. &lt;a href=&quot;https://justinkiggins.com/about&quot;&gt;Justin Kiggins&lt;/a&gt; compiled this dataset using data from the &lt;a href=&quot;https://www.hassavocadoboard.com/retail/volume-and-price-data&quot;&gt;Hass Avocado Board&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&quot;how-to-set-up-your-local-environment&quot;&gt;How to Set Up Your Local Environment&lt;a class=&quot;headerlink&quot; href=&quot;#how-to-set-up-your-local-environment&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;To develop your app, you’ll need a new directory to store your code and data. You’ll also need a clean Python &lt;a href=&quot;https://realpython.com/python-virtual-environments-a-primer/&quot;&gt;virtual environment&lt;/a&gt;. To create those, execute the commands below, choosing the version that matches your operating system:&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;i class=&quot;fa fa-windows text-muted mr-1&quot; aria-hidden=&quot;true&quot;&gt;&lt;/i&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;i class=&quot;fa fa-linux text-muted mr-1&quot; aria-hidden=&quot;true&quot;&gt;&lt;/i&gt;&lt;i class=&quot;fa fa-apple text-muted mr-1&quot; aria-hidden=&quot;true&quot;&gt;&lt;/i&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;highlight pscon&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;mkdir&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;avocado_analytics&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;PS&amp;gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;avocado_analytics&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;PS&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;python&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;-m&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;venv&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;venv&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;PS&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;venv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;\&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Scripts&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;\&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;activate&lt;/span&gt;
&lt;/code&gt;&lt;/pre&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;highlight sh&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 avocado_analytics
&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;cd&lt;/span&gt; avocado_analytics
&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;python -m venv venv
&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;source&lt;/span&gt; venv/bin/activate
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python-dash/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-dash/ »&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 #145: Creating a Python Wordle Clone &amp; Testing Environments With Nox</title>
      <id>https://realpython.com/podcasts/rpp/145/</id>
      <link href="https://realpython.com/podcasts/rpp/145/"/>
      <updated>2023-02-17T12:00:00+00:00</updated>
      <summary>Would you like to practice your Python skills while building a challenging word game? Have you been wanting to learn more about creating command-line interfaces and  making them colorful and interactive? This week on the show, Christopher Trudeau is here, bringing another batch of PyCoder&#x27;s Weekly articles and projects.</summary>
      <content type="html">
        &lt;p&gt;Would you like to practice your Python skills while building a challenging word game? Have you been wanting to learn more about creating command-line interfaces and  making them colorful and interactive? This week on the show, Christopher Trudeau is here, 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>How to Flush the Output of the Python Print Function</title>
      <id>https://realpython.com/python-flush-print-output/</id>
      <link href="https://realpython.com/python-flush-print-output/"/>
      <updated>2023-02-15T14:00:00+00:00</updated>
      <summary>In this tutorial, you&#x27;ll learn how to flush the output of Python&#x27;s print function. You&#x27;ll explore output stream buffering in Python using code examples and learn that output streams are block-buffered by default, and that print() with its default arguments executes line-buffered when interactive.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Do you want to build a compact visual progress indicator for your Python script using &lt;a href=&quot;https://realpython.com/python-print/&quot;&gt;&lt;code&gt;print()&lt;/code&gt;&lt;/a&gt;, but your output doesn’t show up when you’d expect it to? Or are you piping the logs of your script to another application, but you can’t manage to access them in real time? In both cases, &lt;strong&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Data_buffer&quot;&gt;data buffering&lt;/a&gt;&lt;/strong&gt; is the culprit, and you can solve your troubles by flushing the output of &lt;code&gt;print()&lt;/code&gt;.&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;Flush the output data buffer explicitly using the &lt;strong&gt;&lt;code&gt;flush&lt;/code&gt; parameter&lt;/strong&gt; of &lt;code&gt;print()&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Change data buffering for a &lt;strong&gt;single function&lt;/strong&gt;, the &lt;strong&gt;whole script&lt;/strong&gt;, and even your entire &lt;strong&gt;Python environment&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Determine &lt;strong&gt;when&lt;/strong&gt; you need to flush the data buffer explicitly and when that isn’t necessary&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;By repeatedly running a short code snippet that you change only slightly, you’ll see that if you run &lt;code&gt;print()&lt;/code&gt; with its default arguments, then its execution is &lt;strong&gt;line-buffered&lt;/strong&gt; in interactive mode, and &lt;strong&gt;block-buffered&lt;/strong&gt; otherwise.&lt;/p&gt;
&lt;p&gt;You’ll get a feel for what all of that means by exploring the code practically. But before you dive into changing output stream buffering in Python, it’s helpful to revisit how it happens by default, and understand why you might want to change it.&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown=&quot;1&quot;&gt;Free Sample Code:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/python-flush-print-output-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-python-flush-print-output-code&quot; data-focus=&quot;false&quot; markdown=&quot;1&quot;&gt;Click here to download the free sample code&lt;/a&gt; that you’ll use to dive deep into flushing the output of the Python print function.&lt;/p&gt;
&lt;/div&gt;
&lt;h2 id=&quot;understand-how-python-buffers-output&quot;&gt;Understand How Python Buffers Output&lt;a class=&quot;headerlink&quot; href=&quot;#understand-how-python-buffers-output&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;When you make a write call to a &lt;a href=&quot;https://docs.python.org/3/glossary.html#term-file-like-object&quot;&gt;file-like object&lt;/a&gt;, Python buffers the call by default—and that’s a good idea! Disk write and read operations are slow in comparison to &lt;strong&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Random-access_memory&quot;&gt;random-access memory (RAM)&lt;/a&gt;&lt;/strong&gt; access. When your script makes fewer &lt;a href=&quot;https://en.wikipedia.org/wiki/System_call&quot;&gt;system calls&lt;/a&gt; for write operations by batching characters in a RAM data buffer and writing them all at once to disk with a single system call, then you can save a lot of time.&lt;/p&gt;
&lt;p&gt;To put the use case for buffering into a real-world context, think of traffic lights as buffers for car traffic. If every car crossed an intersection immediately upon arrival, it would end in gridlock. That’s why the traffic lights buffer traffic from one direction while the other direction flushes.&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; Data buffers are generally size-based, not time-based, which is where the traffic analogy breaks down. In the context of a data buffer, the traffic lights would switch if a certain number of cars were queued up and waiting.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;However, there are situations when you don’t want to wait for a data buffer to fill up before it flushes. Imagine that there’s an ambulance that needs to get past the crossroads as quickly as possible. You don’t want it to wait at the traffic lights until there’s a certain number of cars queued up.&lt;/p&gt;
&lt;p&gt;In your program, you usually want to flush the data buffer right away when you need real-time feedback on code that has executed. Here are a couple of use cases for immediate flushing:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Instant feedback:&lt;/strong&gt; In an &lt;strong&gt;interactive environment&lt;/strong&gt;, such as a &lt;a href=&quot;https://realpython.com/python-repl/&quot;&gt;Python REPL&lt;/a&gt; or a situation where your &lt;a href=&quot;https://realpython.com/run-python-scripts/&quot;&gt;Python script&lt;/a&gt; writes to a terminal&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;File monitoring:&lt;/strong&gt; In a situation where you’re writing to a &lt;strong&gt;file-like object&lt;/strong&gt;, and the output of the write operation gets read by another program while your script is still executing—for example, when you’re &lt;a href=&quot;https://en.wikipedia.org/wiki/Tail_(Unix)#File_monitoring&quot;&gt;monitoring a log file&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In both cases, you need to read the generated output as soon as it generates, and not only when enough output has assembled to flush the data buffer.&lt;/p&gt;
&lt;p&gt;There are many situations where buffering is helpful, and there are some situations where too much buffering can be a disadvantage. Therefore, there are different types of data buffering that you can implement where they fit best:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Unbuffered&lt;/strong&gt; means that there’s no data buffer. Every byte creates a new system call and gets written independently.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Line-buffered&lt;/strong&gt; means that there’s a data buffer that collects information in memory, and once it encounters a newline character (&lt;code&gt;\n&lt;/code&gt;), the data buffer flushes and writes the whole line in one system call.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Fully-buffered (block-buffered)&lt;/strong&gt; means that there’s a data buffer of a specific size, which collects all the information that you want to write. Once it’s full, it flushes and sends all its contents onward in a single system call.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Python uses block buffering as a default when writing to file-like objects. However, it executes line-buffered if you’re writing to an interactive environment.&lt;/p&gt;
&lt;p&gt;To better understand what that means, write a Python script that simulates a countdown:&lt;/p&gt;
&lt;div class=&quot;highlight python&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;c1&quot;&gt;# countdown.py&lt;/span&gt;

&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;time&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sleep&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;second&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;range&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&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;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;second&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;sleep&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;nb&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Go!&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;By default, each number shows up right when &lt;code&gt;print()&lt;/code&gt; is called in the script. But as you develop and tweak your countdown timer, you might run into a situation where all your output gets buffered. Buffering the whole countdown and printing it all at once when the script finishes would lead to a lot of confusion for the athletes waiting at the start line!&lt;/p&gt;
&lt;p&gt;So how can you make sure that you won’t run into data buffering issues as you develop your Python script?&lt;/p&gt;
&lt;h2 id=&quot;add-a-newline-for-python-to-flush-print-output&quot;&gt;Add a Newline for Python to Flush Print Output&lt;a class=&quot;headerlink&quot; href=&quot;#add-a-newline-for-python-to-flush-print-output&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;If you’re running a code snippet in a Python REPL or executing it as a script directly with your Python interpreter, then you won’t run into any issues with the script shown above.&lt;/p&gt;
&lt;p&gt;In an &lt;a href=&quot;https://realpython.com/interacting-with-python/#using-the-python-interpreter-interactively&quot;&gt;interactive environment&lt;/a&gt;, the standard output stream is &lt;strong&gt;line-buffered&lt;/strong&gt;. This is the output stream that &lt;code&gt;print()&lt;/code&gt; writes to by default. You’re working with an interactive environment any time that your output will display in a terminal. In this case, the data buffer flushes automatically when it encounters a newline character (&lt;code&gt;&quot;\n&quot;&lt;/code&gt;):&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;When interactive, the stdout stream is line-buffered. (&lt;a href=&quot;https://docs.python.org/3/library/sys.html#sys.stdout&quot;&gt;Source&lt;/a&gt;)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python-flush-print-output/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-flush-print-output/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Getters and Setters in Python</title>
      <id>https://realpython.com/courses/getters-and-setters-python/</id>
      <link href="https://realpython.com/courses/getters-and-setters-python/"/>
      <updated>2023-02-14T14:00:00+00:00</updated>
      <summary>In this video course, you&#x27;ll learn what getter and setter methods are, how Python properties are preferred over getters and setters when dealing with attribute access and mutation, and when to use getter and setter methods instead of properties in Python.</summary>
      <content type="html">
        &lt;p&gt;If you come from a language like &lt;a href=&quot;https://realpython.com/java-vs-python/&quot;&gt;Java&lt;/a&gt; or &lt;a href=&quot;https://realpython.com/python-vs-cpp/&quot;&gt;C++&lt;/a&gt;, then you&amp;rsquo;re probably used to writing &lt;strong&gt;getter&lt;/strong&gt; and &lt;strong&gt;setter&lt;/strong&gt; methods for every attribute in your classes. These methods allow you to access and mutate private attributes while maintaining &lt;strong&gt;encapsulation&lt;/strong&gt;. In Python, you&amp;rsquo;ll typically expose attributes as part of your public API and use &lt;strong&gt;properties&lt;/strong&gt; when you need attributes with functional behavior.&lt;/p&gt;
&lt;p&gt;Even though properties are the Pythonic way to go, they can have some practical drawbacks. Because of this, you&amp;rsquo;ll find some situations where getters and setters are preferable over properties.&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;Write &lt;strong&gt;getter&lt;/strong&gt; and &lt;strong&gt;setter&lt;/strong&gt; methods in your classes&lt;/li&gt;
&lt;li&gt;Replace getter and setter methods with &lt;strong&gt;properties&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Explore &lt;strong&gt;other tools&lt;/strong&gt; to replace getter and setter methods in Python&lt;/li&gt;
&lt;li&gt;Decide when &lt;strong&gt;setter&lt;/strong&gt; and &lt;strong&gt;getter&lt;/strong&gt; methods can be the &lt;strong&gt;right tool for the job&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To get the most out of this course, you should be familiar with Python &lt;a href=&quot;https://realpython.com/courses/intro-object-oriented-programming-oop-python/&quot;&gt;object-oriented&lt;/a&gt; programming. It&amp;rsquo;ll also be a plus if you have basic knowledge of Python &lt;a href=&quot;https://realpython.com/courses/property-python/&quot;&gt;properties&lt;/a&gt; and &lt;a href=&quot;https://realpython.com/python-descriptors/&quot;&gt;descriptors&lt;/a&gt;.&lt;/p&gt;
        &lt;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 January 2023</title>
      <id>https://realpython.com/python-news-january-2023/</id>
      <link href="https://realpython.com/python-news-january-2023/"/>
      <updated>2023-02-13T14:00:00+00:00</updated>
      <summary>Quickly get up to speed on what&#x27;s been happening in the world of Python in the past month. The PSF hires a security developer in residence! You&#x27;ll also read about Python 3.12 alpha 4 and three recently published PEPs. Maybe you&#x27;ll get dragged into the ongoing discussion about Python packaging!</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;The new year has arrived, and January brought a flurry of new and interesting &lt;strong&gt;Python enhancement proposals (PEPs)&lt;/strong&gt;. Topics range from &lt;strong&gt;f-string formalization&lt;/strong&gt; and &lt;strong&gt;no-GIL Python&lt;/strong&gt; to &lt;strong&gt;packaging&lt;/strong&gt;. There’s been ample discussion on the &lt;a href=&quot;https://discuss.python.org/&quot;&gt;Python Discourse forum&lt;/a&gt; about the implications of these PEPs, and if you’re still a bit wary of diving deeper into the discussions, then you can get a softer introduction here.&lt;/p&gt;
&lt;p&gt;There have also been a couple of noteworthy &lt;strong&gt;new releases&lt;/strong&gt;, first and foremost the fourth alpha release of Python 3.12. And finally, there’s a new job posting out for a &lt;strong&gt;security developer in residence&lt;/strong&gt; sponsored by the Python Software Foundation (PSF).&lt;/p&gt;
&lt;p&gt;Let’s dive into the biggest &lt;strong&gt;Python news&lt;/strong&gt; from the past month!&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;&lt;p&gt;&lt;strong&gt;Join Now:&lt;/strong&gt; &lt;a href=&quot;&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-newsletter&quot; data-focus=&quot;false&quot;&gt;Click here to join the Real Python Newsletter&lt;/a&gt; and you&#x27;ll never miss another Python tutorial, course update, or post.&lt;/p&gt;&lt;/div&gt;

&lt;h2 id=&quot;pep-701-attempts-to-formalize-f-strings&quot;&gt;PEP 701 Attempts to Formalize f-Strings&lt;a class=&quot;headerlink&quot; href=&quot;#pep-701-attempts-to-formalize-f-strings&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Python’s &lt;a href=&quot;https://realpython.com/python-f-strings/&quot;&gt;f-strings&lt;/a&gt; are great, but there are currently a few edge cases that might make you scratch your head.&lt;/p&gt;
&lt;p&gt;For example, maybe you wanted to greet the new year with a carefully constructed f-string, but you ran into unexpected troubles:&lt;/p&gt;
&lt;div class=&quot;highlight python repl&quot;&gt;&lt;span class=&quot;repl-toggle&quot; title=&quot;Toggle REPL prompts and output&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&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;sa&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;happy &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;([&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;twenty&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;three&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;🥳&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt; &lt;span class=&quot;err&quot;&gt;#&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;it&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&#x27;s 2023!}!!&quot;&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;File &quot;&amp;lt;stdin&amp;gt;&quot;, line 1&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;  f&quot;happy {&quot;\n&quot;.join([&quot;twenty&quot;, &quot;three&quot;, &quot;🥳&quot;]) # it&#x27;s 2023!}!!&quot;&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;             ^&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;SyntaxError: unexpected character after line continuation character&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;You used some double quotes (&lt;code&gt;&quot;&lt;/code&gt;) inside the curly braces (&lt;code&gt;{}&lt;/code&gt;). It looks like Python isn’t happy with that and considers the f-string closed, even though the quotes appear inside the f-string expression part.&lt;/p&gt;
&lt;p&gt;The new year is still fresh, so you won’t let this get you down! You just change the double quotes to single quotes:&lt;/p&gt;
&lt;div class=&quot;highlight python repl&quot;&gt;&lt;span class=&quot;repl-toggle&quot; title=&quot;Toggle REPL prompts and output&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&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;sa&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Happy &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&#x27;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&#x27;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;([&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&#x27;twenty&#x27;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&#x27;three&#x27;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&#x27;🥳&#x27;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt; &lt;span class=&quot;err&quot;&gt;#&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Yes&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;!&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2023&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;!!&quot;&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;File &quot;&amp;lt;stdin&amp;gt;&quot;, line 1&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;  f&quot;Happy {&#x27;\n&#x27;.join([&#x27;twenty&#x27;, &#x27;three&#x27;, &#x27;🥳&#x27;]) # Yes! 2023!}!!&quot;&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;                                                               ^&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;SyntaxError: f-string expression part cannot include a backslash&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Oh! There’s another issue with your new year’s greeting f-string. It looks like you can’t include the backslash (&lt;code&gt;\&lt;/code&gt;) character in an f-string expression. &lt;em&gt;Well, maybe 2023 is more about expanding in breadth than in depth&lt;/em&gt;, you think to yourself. So you replace the newline character (&lt;code&gt;\n&lt;/code&gt;) with a whitespace character (&lt;code&gt;&#x27; &#x27;&lt;/code&gt;) and try again:&lt;/p&gt;
&lt;div class=&quot;highlight python repl&quot;&gt;&lt;span class=&quot;repl-toggle&quot; title=&quot;Toggle REPL prompts and output&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&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;sa&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Happy &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&#x27; &#x27;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;([&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&#x27;twenty&#x27;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&#x27;three&#x27;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&#x27;🥳&#x27;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt; &lt;span class=&quot;err&quot;&gt;#&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Yes&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;!&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2023&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;!!&quot;&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;File &quot;&amp;lt;stdin&amp;gt;&quot;, line 1&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;  f&quot;Happy {&#x27; &#x27;.join([&#x27;twenty&#x27;, &#x27;three&#x27;, &#x27;🥳&#x27;]) # Yes! 2023!}!!&quot;&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;                                                              ^&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;SyntaxError: f-string expression part cannot include &#x27;#&#x27;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Argh! Yet another problem! It seems like you can’t include comments in the f-string expression part—not even when they’re full of joy and optimism!&lt;/p&gt;
&lt;p&gt;Python 3.6 introduced f-strings, and the &lt;a href=&quot;https://en.wikipedia.org/wiki/LL_parser&quot;&gt;LL(1) parser&lt;/a&gt; that Python used back then wasn’t able to handle these edge cases.&lt;/p&gt;
&lt;p&gt;Maybe running into the limitations of f-strings has slightly dampened your optimistic beginning of 2023. But don’t write this year off quite yet, because these limitations may go away soon.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://twitter.com/pyblogsal&quot;&gt;Pablo Galindo Salgado&lt;/a&gt; authored &lt;a href=&quot;https://peps.python.org/pep-0701/&quot;&gt;PEP 701 – Syntactic formalization of f-strings&lt;/a&gt; at the end of last year. The PEP proposes a formalized grammar for f-strings, which could be directly integrated into the &lt;a href=&quot;https://en.wikipedia.org/wiki/Parsing_expression_grammar&quot;&gt;parsing expression grammar (PEG)&lt;/a&gt; parser that Python’s been using &lt;a href=&quot;https://realpython.com/python39-new-features/#a-more-powerful-python-parser&quot;&gt;since version 3.9&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python-news-january-2023/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-news-january-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 #144: Wrangling Business Process Models With Python and SpiffWorkflow</title>
      <id>https://realpython.com/podcasts/rpp/144/</id>
      <link href="https://realpython.com/podcasts/rpp/144/"/>
      <updated>2023-02-10T12:00:00+00:00</updated>
      <summary>Can you describe your business processes with flowcharts? What if you could define the steps in a standard notation and implement the workflows in pure Python? This week on the show, Dan Funk from Sartography is here to discuss SpiffWorkflow.</summary>
      <content type="html">
        &lt;p&gt;Can you describe your business processes with flowcharts? What if you could define the steps in a standard notation and implement the workflows in pure Python? This week on the show, Dan Funk from Sartography is here to discuss SpiffWorkflow.&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: Building Systems With Classes</title>
      <id>https://realpython.com/courses/python-basics-class/</id>
      <link href="https://realpython.com/courses/python-basics-class/"/>
      <updated>2023-02-07T14:00:00+00:00</updated>
      <summary>In this video course, you&#x27;ll learn how to work with classes to build complex systems in Python. By composing classes, inheriting from other classes, and overriding class behavior, you&#x27;ll harness the power of object-oriented programming (OOP).</summary>
      <content type="html">
        &lt;p&gt;In the &lt;a href=&quot;https://realpython.com/courses/python-basics-oop/&quot;&gt;previous course&lt;/a&gt; in the &lt;a href=&quot;https://realpython.com/learning-paths/python-basics/&quot;&gt;Python Basics&lt;/a&gt; series, you learned how to use classes to create new objects. Now that you understand the basics of object-oriented programming (OOP), it&amp;rsquo;s time to put those classes to work.&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;Compose&lt;/strong&gt; classes together to create layers of functionality&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Inherit&lt;/strong&gt; and &lt;strong&gt;override&lt;/strong&gt; behavior from other classes to create variations&lt;/li&gt;
&lt;li&gt;Creatively &lt;strong&gt;mix&lt;/strong&gt; and &lt;strong&gt;match&lt;/strong&gt; these approaches&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;With these capabilities, you&amp;rsquo;ll be able to build more complex systems and write readable, reusable code.&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;. &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 #143: Create Interactive Maps &amp; Geospatial Data Visualizations With Python</title>
      <id>https://realpython.com/podcasts/rpp/143/</id>
      <link href="https://realpython.com/podcasts/rpp/143/"/>
      <updated>2023-02-03T12:00:00+00:00</updated>
      <summary>Would you like to quickly add data to a map with Python? Have you wanted to create beautiful interactive maps and export them as a stand-alone static web page? This week on the show, Christopher Trudeau is here, bringing another batch of PyCoder&#x27;s Weekly articles and projects.</summary>
      <content type="html">
        &lt;p&gt;Would you like to quickly add data to a map with Python? Have you wanted to create beautiful interactive maps and export them as a stand-alone static web page? This week on the show, Christopher Trudeau is here, 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>Using the Terminal on Linux</title>
      <id>https://realpython.com/courses/using-terminal-linux/</id>
      <link href="https://realpython.com/courses/using-terminal-linux/"/>
      <updated>2023-01-31T14:00:00+00:00</updated>
      <summary>In this Code Conversation video course, you&#x27;ll learn how to use the terminal on Linux.
You&#x27;ll navigate the file system with Philipp and Geir Arne and perform common tasks like creating files and folders. If you&#x27;ve never used the terminal before, then this video course will help you get started.</summary>
      <content type="html">
        &lt;p&gt;The &lt;strong&gt;terminal&lt;/strong&gt; can be intimidating to work with when you&amp;rsquo;re used to working with graphical user interfaces. However, it&amp;rsquo;s an important tool that you need to get used to in your journey as a Python developer.
Even though you can substitute some workflows in the terminal with apps that contain a graphical user interface (GUI), you may need to open the terminal at some point in your life as a Python developer.&lt;/p&gt;
&lt;p&gt;In this &lt;strong&gt;Code Conversation&lt;/strong&gt;, you&amp;rsquo;ll follow a chat between Philipp and Geir Arne as they perform common tasks in the terminal on Linux, such as:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Showing the current working directory&lt;/li&gt;
&lt;li&gt;Listing the contents of a folder&lt;/li&gt;
&lt;li&gt;Adding text to files without opening them&lt;/li&gt;
&lt;li&gt;Displaying the content of a file&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Along the way, you&amp;rsquo;ll learn how to:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Find the terminal&lt;/strong&gt; on your operating system&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Open the terminal&lt;/strong&gt; for the first time&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Navigate your file system&lt;/strong&gt; with basic commands&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Create files and folders&lt;/strong&gt; with the terminal&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Run Python files&lt;/strong&gt; on Linux&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you&amp;rsquo;ve never worked with the terminal on Linux before or you want to see some interesting use cases to incorporate the terminal into your workflow, then this video course is the perfect start for you.&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 #142: Orchestrating Large and Small Projects With Apache Airflow</title>
      <id>https://realpython.com/podcasts/rpp/142/</id>
      <link href="https://realpython.com/podcasts/rpp/142/"/>
      <updated>2023-01-27T12:00:00+00:00</updated>
      <summary>Have you worked on a project that needed an orchestration tool? How do you define the workflow of an entire data pipeline or a messaging system with Python? This week on the show, Calvin Hendryx-Parker is back to talk about using Apache Airflow and orchestrating Python projects.</summary>
      <content type="html">
        &lt;p&gt;Have you worked on a project that needed an orchestration tool? How do you define the workflow of an entire data pipeline or a messaging system with Python? This week on the show, Calvin Hendryx-Parker is back to talk about using Apache Airflow and orchestrating Python 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: Object-Oriented Programming</title>
      <id>https://realpython.com/courses/python-basics-oop/</id>
      <link href="https://realpython.com/courses/python-basics-oop/"/>
      <updated>2023-01-24T14:00:00+00:00</updated>
      <summary>In this video course, you&#x27;ll get to know OOP, or object-oriented programming. You&#x27;ll learn how to create a class, use classes to create new objects, and instantiate classes with attributes.</summary>
      <content type="html">
        &lt;p&gt;&lt;strong&gt;OOP&lt;/strong&gt;, or &lt;strong&gt;object-oriented programming&lt;/strong&gt;, is a method of structuring a program by bundling related properties and behaviors into individual objects. &lt;/p&gt;
&lt;p&gt;Conceptually, objects are like the components of a system. Think of a program as a factory assembly line of sorts. At each step of the assembly line, a system component processes some material, ultimately transforming raw material into a finished product.&lt;/p&gt;
&lt;p&gt;An object contains both data, like the raw or preprocessed materials at each step on an assembly line, and behavior, like the action that each assembly line component performs.&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;Create a &lt;strong&gt;&lt;code&gt;class&lt;/code&gt;&lt;/strong&gt;, which is like a blueprint for creating an object&lt;/li&gt;
&lt;li&gt;Use classes to create new &lt;strong&gt;objects&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Instantiate classes with &lt;strong&gt;attributes&lt;/strong&gt; and &lt;strong&gt;methods&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. 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 #141: Exploring Python With bpython &amp; Formalizing f-String Grammar</title>
      <id>https://realpython.com/podcasts/rpp/141/</id>
      <link href="https://realpython.com/podcasts/rpp/141/"/>
      <updated>2023-01-20T12:00:00+00:00</updated>
      <summary>Have you used the Python Read-Eval-Print Loop (REPL) to explore the language and learn about how it operates? Would it help if it provided syntax highlighting, definitions, and code completion and behaved more like an IDE? This week on the show, Christopher Trudeau is here, bringing another batch of PyCoder&#x27;s Weekly articles and projects.</summary>
      <content type="html">
        &lt;p&gt;Have you used the Python Read-Eval-Print Loop (REPL) to explore the language and learn about how it operates? Would it help if it provided syntax highlighting, definitions, and code completion and behaved more like an IDE? This week on the show, Christopher Trudeau is here, 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: File System Operations</title>
      <id>https://realpython.com/courses/python-file-system-exercises/</id>
      <link href="https://realpython.com/courses/python-file-system-exercises/"/>
      <updated>2023-01-17T14:00:00+00:00</updated>
      <summary>In this Python Basics Exercises course, you&#x27;ll review how to use Python to work with your computer&#x27;s file system. Then, you&#x27;ll tackle a coding challenge to further develop your skills.</summary>
      <content type="html">
        &lt;p&gt;In &lt;a href=&quot;https://realpython.com/courses/python-basics-file-system-operations/&quot;&gt;Python Basics: File System Operations&lt;/a&gt;, you learned how to use Python to work with files and folders. As a programmer, you&amp;rsquo;ll use the &lt;strong&gt;&lt;code&gt;pathlib&lt;/code&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;code&gt;shutil&lt;/code&gt;&lt;/strong&gt; modules to complete &lt;strong&gt;file system operations&lt;/strong&gt; without relying on your &lt;strong&gt;graphical user interface (GUI)&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;While you already got lots of hands-on practice with file system operations, programmers never stop training! The more you use your new skills, the more comfortable you&amp;rsquo;ll be when it&amp;rsquo;s time to put them to work in your own coding. That&amp;rsquo;s why it&amp;rsquo;s a great idea to complete exercises to reinforce and test your knowledge of the file system.&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; a directory&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Iterating&lt;/strong&gt; over the contents of a directory&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Searching&lt;/strong&gt; for files using wildcards&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Moving&lt;/strong&gt; and &lt;strong&gt;deleting&lt;/strong&gt; files and folders&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 #140: Speeding Up Your DataFrames With Polars</title>
      <id>https://realpython.com/podcasts/rpp/140/</id>
      <link href="https://realpython.com/podcasts/rpp/140/"/>
      <updated>2023-01-13T12:00:00+00:00</updated>
      <summary>How can you get more performance from your existing data science infrastructure? What if a DataFrame library could take advantage of your machine&#x27;s available cores and provide built-in methods for handling larger-than-RAM datasets? This week on the show, Liam Brannigan is here to discuss Polars.</summary>
      <content type="html">
        &lt;p&gt;How can you get more performance from your existing data science infrastructure? What if a DataFrame library could take advantage of your machine&#x27;s available cores and provide built-in methods for handling larger-than-RAM datasets? This week on the show, Liam Brannigan is here to discuss Polars.&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 Terminal on macOS</title>
      <id>https://realpython.com/courses/using-terminal-macos/</id>
      <link href="https://realpython.com/courses/using-terminal-macos/"/>
      <updated>2023-01-10T14:00:00+00:00</updated>
      <summary>In this Code Conversation video course, you&#x27;ll learn how to use the terminal on macOS.
You&#x27;ll navigate the file system with Philipp and Martin and perform common tasks like creating files and folders. If you&#x27;ve never used the terminal before, then this video course will help you get started.</summary>
      <content type="html">
        &lt;p&gt;The &lt;strong&gt;terminal&lt;/strong&gt; can be intimidating to work with when you&amp;rsquo;re used to working with graphical user interfaces. However, it&amp;rsquo;s an important tool that you need to get used to in your journey as a Python developer.
Even though you can substitute some workflows in the terminal with apps that contain a graphical user interface (GUI), you may need to open the terminal at some point in your life as a Python developer.&lt;/p&gt;
&lt;p&gt;In this &lt;strong&gt;Code Conversation&lt;/strong&gt;, you&amp;rsquo;ll follow a chat between Philipp and Martin as they perform common tasks in the terminal on macOS, such as:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Showing the current working directory&lt;/li&gt;
&lt;li&gt;Listing the contents of a folder&lt;/li&gt;
&lt;li&gt;Adding text to files without opening them&lt;/li&gt;
&lt;li&gt;Displaying the content of a file&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Along the way, you&amp;rsquo;ll learn how to:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Find the terminal&lt;/strong&gt; on your operating system&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Open the terminal&lt;/strong&gt; for the first time&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Navigate your filesystem&lt;/strong&gt; with basic commands&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Create files and folders&lt;/strong&gt; with the terminal&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Run Python files&lt;/strong&gt; on macOS&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you&amp;rsquo;ve never worked with the terminal on macOS before or you want to see some interesting use cases to incorporate the terminal into your workflow, then this video course is the perfect start for you.&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 #139: Surveying Comprehension Constructs &amp; Python Parallelism Infighting</title>
      <id>https://realpython.com/podcasts/rpp/139/</id>
      <link href="https://realpython.com/podcasts/rpp/139/"/>
      <updated>2023-01-06T12:00:00+00:00</updated>
      <summary>Have you embraced the use of comprehensions in your Python journey? Are you familiar with all the varieties of comprehension constructs? This week on the show, Christopher Trudeau is here, bringing another batch of PyCoder&#x27;s Weekly articles and projects.</summary>
      <content type="html">
        &lt;p&gt;Have you embraced the use of comprehensions in your Python journey? Are you familiar with all the varieties of comprehension constructs? This week on the show, Christopher Trudeau is here, 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>
