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

  
    <entry>
      <title>The Real Python Podcast – Episode #69: Planning a Faster Future at the Python Language Summit</title>
      <id>https://realpython.com/podcasts/rpp/69/</id>
      <link href="https://realpython.com/podcasts/rpp/69/"/>
      <updated>2021-07-16T12:00:00+00:00</updated>
      <summary>Do you wonder what the future may hold for the Python language? Are there speed improvements coming soon? What if you could be in the room while the core developers discuss Python&#x27;s future? This week on the show, we have Joanna Jablonski, who was invited to the Python Language Summit 2021 as a journalist to summarize and document the event.</summary>
      <content type="html">
        &lt;p&gt;Do you wonder what the future may hold for the Python language? Are there speed improvements coming soon? What if you could be in the room while the core developers discuss Python&#x27;s future? This week on the show, we have Joanna Jablonski, who was invited to the Python Language Summit 2021 as a journalist to summarize and document the event.&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 FastAPI to Build Python Web APIs</title>
      <id>https://realpython.com/fastapi-python-web-apis/</id>
      <link href="https://realpython.com/fastapi-python-web-apis/"/>
      <updated>2021-07-14T14:00:00+00:00</updated>
      <summary>In this guide, you&#x27;ll learn the main concepts of FastAPI and how to use it to quickly create web APIs that implement best practices by default. By the end of it, you will be able to start creating production-ready web APIs.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Creating APIs, or &lt;strong&gt;application programming interfaces&lt;/strong&gt;, is an important part of making your software accessible to a broad range of users. In this tutorial, you will learn the main concepts of &lt;strong&gt;FastAPI&lt;/strong&gt; and how to use it to quickly create web APIs that implement best practices by default.&lt;/p&gt;
&lt;p&gt;By the end of it, you will be able to start creating production-ready web APIs, and you will have the understanding needed to go deeper and learn more for your specific use cases.&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;Use &lt;strong&gt;path parameters&lt;/strong&gt; to get a unique URL path per item&lt;/li&gt;
&lt;li&gt;Receive JSON data in your requests using &lt;strong&gt;pydantic&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Use API best practices, including &lt;strong&gt;validation&lt;/strong&gt;, &lt;strong&gt;serialization&lt;/strong&gt;, and &lt;strong&gt;documentation&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Continue learning about FastAPI for &lt;strong&gt;your use cases&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This tutorial is written by the &lt;a href=&quot;https://realpython.com/team/sramirez/&quot;&gt;author of FastAPI&lt;/a&gt;. It contains a careful selection of fragments from the official documentation, avoiding getting lost in technical details while helping you get up to speed as fast as possible.&lt;/p&gt;
&lt;p&gt;To get the most out of this tutorial, it would be helpful for you to know the basics of &lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Web/HTTP/Overview&quot;&gt;what HTTP is and how it works&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python-json/&quot;&gt;what JSON is&lt;/a&gt;, and &lt;a href=&quot;https://fastapi.tiangolo.com/python-types/&quot;&gt;Python type hints&lt;/a&gt;. You will also benefit from using a &lt;a href=&quot;https://realpython.com/python-virtual-environments-a-primer/&quot;&gt;virtual environment&lt;/a&gt;, as is the case for any Python project.&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown=&quot;1&quot;&gt;Free Bonus:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/python-mastery-course/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-python-mastery-course&quot; data-focus=&quot;false&quot; markdown=&quot;1&quot;&gt;5 Thoughts On Python Mastery&lt;/a&gt;, a free course for Python developers that shows you the roadmap and the mindset you’ll need to take your Python skills to the next level.&lt;/p&gt;
&lt;/div&gt;
&lt;h2 id=&quot;what-is-fastapi&quot;&gt;What Is FastAPI?&lt;a class=&quot;headerlink&quot; href=&quot;#what-is-fastapi&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;FastAPI is a modern, high-performance web framework for building APIs with Python based on standard type hints. It has the following key features:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Fast to run&lt;/strong&gt;: It offers very high performance, on par with &lt;strong&gt;NodeJS&lt;/strong&gt; and &lt;strong&gt;Go&lt;/strong&gt;, thanks to &lt;a href=&quot;https://www.starlette.io/&quot;&gt;Starlette&lt;/a&gt; and &lt;a href=&quot;https://pydantic-docs.helpmanual.io/&quot;&gt;pydantic&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Fast to code&lt;/strong&gt;: It allows for significant increases in development speed.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Reduced number of bugs&lt;/strong&gt;: It reduces the possibility for human-induced errors.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Intuitive&lt;/strong&gt;: It offers great editor support, with completion everywhere and less time debugging.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Straightforward&lt;/strong&gt;: It’s designed to be uncomplicated to use and learn, so you can spend less time reading documentation.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Short&lt;/strong&gt;: It minimizes code duplication.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Robust&lt;/strong&gt;: It provides production-ready code with automatic interactive documentation.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Standards-based&lt;/strong&gt;: It’s based on the open standards for APIs, &lt;a href=&quot;https://github.com/OAI/OpenAPI-Specification&quot;&gt;OpenAPI&lt;/a&gt; and &lt;a href=&quot;https://json-schema.org/&quot;&gt;JSON Schema&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The framework is designed to optimize your developer experience so that you can write simple code to build production-ready APIs with best practices by default.&lt;/p&gt;
&lt;h2 id=&quot;install-fastapi&quot;&gt;Install FastAPI&lt;a class=&quot;headerlink&quot; href=&quot;#install-fastapi&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;As with any other Python project, it would be best to start by creating a virtual environment. If you are not familiar with how to do that, then you can check out the &lt;a href=&quot;https://realpython.com/python-virtual-environments-a-primer/&quot;&gt;Primer on Virtual Environments&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The first step is to install FastAPI and &lt;a href=&quot;https://www.uvicorn.org/#introduction&quot;&gt;Uvicorn&lt;/a&gt; using &lt;a href=&quot;https://realpython.com/what-is-pip/&quot;&gt;&lt;code&gt;pip&lt;/code&gt;&lt;/a&gt;:&lt;/p&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 pip install fastapi uvicorn&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;standard&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;With that, you have FastAPI and Uvicorn installed and are ready to learn how to use them. FastAPI is the framework you’ll use to build your API, and Uvicorn is the server that will use the API you build to serve requests.&lt;/p&gt;
&lt;h2 id=&quot;first-steps&quot;&gt;First Steps&lt;a class=&quot;headerlink&quot; href=&quot;#first-steps&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;To get started, in this section, you will create a minimal FastAPI app, run it with a server using Uvicorn, and then learn all the interacting parts. This will give you a very quick overview of how everything works.&lt;/p&gt;
&lt;h3 id=&quot;create-a-first-api&quot;&gt;Create a First API&lt;a class=&quot;headerlink&quot; href=&quot;#create-a-first-api&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;A basic FastAPI file looks like this:&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;# main.py&lt;/span&gt;

&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;fastapi&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;FastAPI&lt;/span&gt;

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

&lt;span class=&quot;nd&quot;&gt;@app&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;/&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;async&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;root&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;():&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;message&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;Hello World&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;Copy the code above to a file named &lt;code&gt;main.py&lt;/code&gt;, and just like that, you have a fully functional API application with some best practices like automatic documentation and serialization built in. You will learn more about those features next.&lt;/p&gt;
&lt;p&gt;This code defines your application, but it won’t run on itself if you call it with &lt;code&gt;python&lt;/code&gt; directly. To run it, you need a &lt;strong&gt;server&lt;/strong&gt; program. In the steps above, you already installed &lt;a href=&quot;https://www.uvicorn.org/&quot;&gt;Uvicorn&lt;/a&gt;. That will be your server.&lt;/p&gt;
&lt;h3 id=&quot;run-the-first-api-app-with-uvicorn&quot;&gt;Run the First API App With Uvicorn&lt;a class=&quot;headerlink&quot; href=&quot;#run-the-first-api-app-with-uvicorn&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Run the live server using Uvicorn:&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/fastapi-python-web-apis/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/fastapi-python-web-apis/ »&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 Square Root Function in Python</title>
      <id>https://realpython.com/courses/square-root-function-python/</id>
      <link href="https://realpython.com/courses/square-root-function-python/"/>
      <updated>2021-07-13T14:00:00+00:00</updated>
      <summary>In this quick and practical course, you&#x27;ll learn what a square root is and how to calculate one in Python. You&#x27;ll even see how you can use the Python square root function to solve a real-world problem.</summary>
      <content type="html">
        &lt;p&gt;Are you trying to solve a quadratic equation? Maybe you need to calculate the length of one side of a right triangle. You can use the &lt;code&gt;math&lt;/code&gt; module&amp;rsquo;s &lt;strong&gt;&lt;code&gt;sqrt()&lt;/code&gt;&lt;/strong&gt; method for determining the square root of a number. This course covers the use of &lt;code&gt;math.sqrt()&lt;/code&gt; as well as related methods.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this course, you&amp;rsquo;ll learn:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;About &lt;strong&gt;square roots&lt;/strong&gt; and related mathematical operations&lt;/li&gt;
&lt;li&gt;How to use the Python square root function, &lt;strong&gt;&lt;code&gt;sqrt()&lt;/code&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Where &lt;code&gt;sqrt()&lt;/code&gt; can be useful in &lt;strong&gt;real-world examples&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Python News: What&#x27;s New From June 2021?</title>
      <id>https://realpython.com/python-news-june-2021/</id>
      <link href="https://realpython.com/python-news-june-2021/"/>
      <updated>2021-07-12T14:00:00+00:00</updated>
      <summary>June 2021 was full of notable events in the Python world! In this article, you&#x27;ll get caught up on what&#x27;s been happening with Python during this past month, including some changes at the Python Software Foundation and the announcement of a new recipient of the PSF Fiscal Sponsorship Program.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;If you want to get up to speed on what happened in the world of &lt;strong&gt;Python&lt;/strong&gt; in &lt;strong&gt;June 2021&lt;/strong&gt;, then you’ve come to the right place to get your &lt;strong&gt;news&lt;/strong&gt;!&lt;/p&gt;
&lt;p&gt;June was a month of change. &lt;a href=&quot;https://twitter.com/ewa_jodlowska&quot;&gt;Ewa Jodlowska&lt;/a&gt;, the &lt;strong&gt;Executive Director of the Python Software Foundation (PSF)&lt;/strong&gt;, announced her departure after serving for ten years, and the PSF Board of Directors gained &lt;strong&gt;three new directors&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Let’s dive into the biggest Python news from the past month!&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown=&quot;1&quot;&gt;Free Bonus:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/python-mastery-course/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-python-mastery-course&quot; data-focus=&quot;false&quot; markdown=&quot;1&quot;&gt;5 Thoughts On Python Mastery&lt;/a&gt;, a free course for Python developers that shows you the roadmap and the mindset you’ll need to take your Python skills to the next level.&lt;/p&gt;
&lt;/div&gt;
&lt;h2 id=&quot;ewa-jodlowska-steps-down-as-psf-executive-director&quot;&gt;Ewa Jodlowska Steps Down as PSF Executive Director&lt;a class=&quot;headerlink&quot; href=&quot;#ewa-jodlowska-steps-down-as-psf-executive-director&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;On June 16, the Python Software Foundation (PSF) &lt;a href=&quot;https://pyfound.blogspot.com/2021/06/update-on-python-software-foundation.html&quot;&gt;announced&lt;/a&gt; that Executive Director Ewa Jodlowska has decided to leave the foundation at the end of 2021.&lt;/p&gt;
&lt;p&gt;Even if you haven’t heard of Ewa, you’ve undoubtedly been impacted by her work. As Executive Director, Ewa is responsible for ensuring that the PSF achieves &lt;a href=&quot;https://www.python.org/psf/mission/&quot;&gt;its mission&lt;/a&gt; “to promote, protect, and advance the Python programming language, and to support and facilitate the growth of a diverse and international community of Python programmers.”&lt;/p&gt;
&lt;p&gt;The PSF is responsible for managing and maintaining the &lt;a href=&quot;https://python.org&quot;&gt;python.org&lt;/a&gt; website as well as the &lt;a href=&quot;https://pypi.org/&quot;&gt;Python Package Index&lt;/a&gt;. The PSF also supports and funds events and workshops for organizations such as &lt;a href=&quot;https://djangogirls.org/&quot;&gt;Django Girls&lt;/a&gt; and &lt;a href=&quot;https://pyladies.com/&quot;&gt;PyLadies&lt;/a&gt; as well as other Python conferences and meetups worldwide.&lt;/p&gt;
&lt;p&gt;In addition to managing community outreach, the PSF supports and funds Python software development. This includes organizing, funding, and supporting CPython sprints. As you’ll learn &lt;a href=&quot;#jazzband-accepted-to-the-psf-fiscal-sponsorship-program&quot;&gt;later&lt;/a&gt; in this article, the PSF’s funding and support go beyond support for the core Python language. The PSF also helps Python libraries with various grants and fiscal sponsorship programs.&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python-news-june-2021/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-news-june-2021/ »&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 #68: Exploring the functools Module and Complex Numbers in Python</title>
      <id>https://realpython.com/podcasts/rpp/68/</id>
      <link href="https://realpython.com/podcasts/rpp/68/"/>
      <updated>2021-07-09T12:00:00+00:00</updated>
      <summary>Are you ready to expand your Python knowledge into the intermediate to advanced territory? What tools are awaiting your discovery inside Python&#x27;s functools module? This week on the show, David Amos is back, and he&#x27;s brought another batch of PyCoder&#x27;s Weekly articles and projects.</summary>
      <content type="html">
        &lt;p&gt;Are you ready to expand your Python knowledge into the intermediate to advanced territory? What tools are awaiting your discovery inside Python&#x27;s functools module? This week on the show, David Amos is back, and he&#x27;s brought 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>What Can I Do With Python?</title>
      <id>https://realpython.com/what-can-i-do-with-python/</id>
      <link href="https://realpython.com/what-can-i-do-with-python/"/>
      <updated>2021-07-07T14:00:00+00:00</updated>
      <summary>In this tutorial, you&#x27;ll find a set of guidelines that will help you start applying your Python skills to real-world problems. By the end of your reading, you&#x27;ll be able to answer the question &quot;What can I do with Python?&quot;</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;You’ve finished a course or finally made it to the end of a &lt;a href=&quot;https://realpython.com/products/python-basics-book/&quot;&gt;book&lt;/a&gt; that teaches you the &lt;a href=&quot;https://realpython.com/learning-paths/python3-introduction/&quot;&gt;basics of programming with Python&lt;/a&gt;. You’ve learned about &lt;a href=&quot;https://realpython.com/python-variables/&quot;&gt;variables&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python-lists-tuples/&quot;&gt;lists, tuples&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python-dicts/&quot;&gt;dictionaries&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python-for-loop/&quot;&gt;&lt;code&gt;for&lt;/code&gt;&lt;/a&gt; and &lt;a href=&quot;https://realpython.com/python-while-loop/&quot;&gt;&lt;code&gt;while&lt;/code&gt;&lt;/a&gt; loops, &lt;a href=&quot;https://realpython.com/python-conditional-statements/&quot;&gt;conditional statements&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python3-object-oriented-programming/&quot;&gt;object-oriented concepts&lt;/a&gt;, and more. So, what’s next? What can you do with Python nowadays?&lt;/p&gt;
&lt;p&gt;Python is a versatile programming language with many use cases in a variety of different fields. If you’ve grasped the basics of Python and are itching to build something with the language, then it’s time to figure out what your next step should be.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this article, you’ll see how you can use Python for:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Doing general &lt;strong&gt;software development&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Diving into &lt;strong&gt;data science and math&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Speeding up and automating your &lt;strong&gt;workflow&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Building &lt;strong&gt;embedded systems&lt;/strong&gt; and &lt;strong&gt;robots&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You’ll also find ideas for practical projects, resources, and tutorials that you can use to start building things with Python right away.&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 Bonus:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/python-basics-sample-free-chapter/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-python-basics-sample-free-chapter&quot; data-focus=&quot;false&quot; markdown=&quot;1&quot;&gt;Get a sample chapter from Python Basics: A Practical Introduction to Python 3&lt;/a&gt; to see how you can go from beginner to intermediate in Python with a complete curriculum, up to date for Python 3.9.&lt;/p&gt;
&lt;/div&gt;
&lt;h2 id=&quot;python-in-the-real-world&quot;&gt;Python in the Real World&lt;a class=&quot;headerlink&quot; href=&quot;#python-in-the-real-world&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Python is a high-level and general-purpose programming language. As this definition implies, you can use Python for &lt;a href=&quot;https://www.jetbrains.com/lp/python-developers-survey-2020/#PurposesUsingPython&quot;&gt;several purposes&lt;/a&gt;, from &lt;a href=&quot;https://realpython.com/tutorials/web-dev/&quot;&gt;web development&lt;/a&gt; to &lt;a href=&quot;https://realpython.com/tutorials/data-science/&quot;&gt;data science&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/tutorials/machine-learning/&quot;&gt;machine learning&lt;/a&gt;, and &lt;a href=&quot;https://talkpython.fm/episodes/show/232/become-a-robot-developer-with-python&quot;&gt;robotics&lt;/a&gt;. Python’s real-world use cases are limitless.&lt;/p&gt;
&lt;p&gt;You’re probably wondering what people are &lt;a href=&quot;https://www.python.org/success-stories/&quot;&gt;successfully building&lt;/a&gt; with Python. If you take a quick look at companies using the language, then you’ll find &lt;a href=&quot;https://realpython.com/world-class-companies-using-python/&quot;&gt;world-class companies&lt;/a&gt;, such as Google, YouTube, Facebook, Instagram, Spotify, Netflix, and more.&lt;/p&gt;
&lt;p&gt;Google has used Python &lt;a href=&quot;https://stackoverflow.com/questions/2560310/heavy-usage-of-python-at-google/2561008#2561008&quot;&gt;from the start&lt;/a&gt;, and it’s gained a place as one of the tech giant’s main server-side languages. &lt;a href=&quot;https://twitter.com/gvanrossum&quot;&gt;Guido van Rossum&lt;/a&gt;, Python’s creator, worked there for several years, overseeing the language’s development.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://pyfound.blogspot.com/2021/05/the-2021-python-language-summit-cpython.html&quot;&gt;Instagram likes Python&lt;/a&gt; for its simplicity. The service &lt;a href=&quot;https://instagram-engineering.com/web-service-efficiency-at-instagram-with-python-4976d078e366&quot;&gt;is known for&lt;/a&gt; running “the world’s largest deployment of the Django web framework, which is written entirely in Python.”&lt;/p&gt;
&lt;p&gt;Spotify uses the language for data analysis and back-end services. According to its team, Python’s ease of use leads to a lightning-fast development pipeline. Spotify performs a ton of analysis to give recommendations to its users, so it needs a productive tool that works well. Python to the rescue!&lt;/p&gt;
&lt;p&gt;You’ll also find that Python has been vital for science and &lt;a href=&quot;https://realpython.com/python-news-march-2021/#python-lands-on-mars&quot;&gt;space exploration&lt;/a&gt;, with a lot of exciting use cases in &lt;a href=&quot;https://en.wikipedia.org/wiki/Robotics&quot;&gt;robotics&lt;/a&gt; and hardware control.&lt;/p&gt;
&lt;p&gt;In this article, you’ll see how you can use your Python skills in a wide range of areas.&lt;/p&gt;
&lt;h2 id=&quot;develop-cool-software&quot;&gt;Develop Cool Software&lt;a class=&quot;headerlink&quot; href=&quot;#develop-cool-software&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Python’s ecosystem provides a rich set of &lt;a href=&quot;https://en.wikipedia.org/wiki/Software_framework&quot;&gt;frameworks&lt;/a&gt;, tools, and libraries that allow you to write almost any kind of application. You can use Python to build applications for the &lt;a href=&quot;https://en.wikipedia.org/wiki/World_Wide_Web&quot;&gt;Web&lt;/a&gt; as well as &lt;a href=&quot;https://en.wikipedia.org/wiki/Desktop_metaphor&quot;&gt;desktop&lt;/a&gt; and &lt;a href=&quot;https://en.wikipedia.org/wiki/Mobile_computing&quot;&gt;mobile&lt;/a&gt; platforms. You can even use Python to create video games.&lt;/p&gt;
&lt;h3 id=&quot;web-development&quot;&gt;Web Development&lt;a class=&quot;headerlink&quot; href=&quot;#web-development&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Developing web applications with Python is one of the most in-demand skills, with a lot of opportunities for you out there. In this field, you’ll find several useful Python frameworks, libraries, and tools for developing cool web applications, APIs, and more. Here are some of the most popular Python web frameworks:&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;Framework&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://www.djangoproject.com/&quot;&gt;Django&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Django is a high-level framework that encourages rapid web application development with a clean and pragmatic design. It allows you to focus on writing your applications without having to reinvent the wheel.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://fastapi.tiangolo.com/&quot;&gt;FastAPI&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;FastAPI is a fast and performant web framework for building web APIs. It’s built on top of modern Python type hint features and enables &lt;a href=&quot;https://realpython.com/async-io-python/&quot;&gt;asynchronous&lt;/a&gt; programming.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://palletsprojects.com/p/flask/&quot;&gt;Flask&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Flask is a lightweight framework for creating &lt;a href=&quot;https://wsgi.readthedocs.io/&quot;&gt;WSGI&lt;/a&gt; web applications. It allows you to get started quickly and to scale up to complex applications if needed.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://www.tornadoweb.org/en/stable/&quot;&gt;Tornado&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Tornado is a web framework and asynchronous networking library. It uses non-blocking network &lt;a href=&quot;https://en.wikipedia.org/wiki/Input/output&quot;&gt;I/O&lt;/a&gt;, so you can write applications that can scale to tens of thousands of open connections.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;To get started with web development, check out:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/tutorials/web-dev/&quot;&gt;Python Web Development Tutorials&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/tutorials/django/&quot;&gt;Django Tutorials&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/tutorials/flask/&quot;&gt;Flask Tutorials&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you want some practical project ideas for applying your web development skills right away, then you can build a &lt;a href=&quot;https://realpython.com/get-started-with-django-1/&quot;&gt;portfolio web application with Django&lt;/a&gt;. With so many jobs and career opportunities out there, it’s a great idea to have a personal portfolio these days, so go ahead and give it a try. You don’t need to know anything about Django to get started with this step-by-step tutorial. It’s perfect if you’re itching to get your hands dirty with web development in Python.&lt;/p&gt;
&lt;h3 id=&quot;cli-development&quot;&gt;CLI Development&lt;a class=&quot;headerlink&quot; href=&quot;#cli-development&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Another field in which Python shines is &lt;a href=&quot;https://en.wikipedia.org/wiki/Command-line_interface&quot;&gt;command-line interface (CLI)&lt;/a&gt; application development. CLI applications are everywhere and allow you to automate repetitive and boring tasks in your day-to-day work by creating small and large tools for your command line.&lt;/p&gt;
&lt;p&gt;In Python, you have an impressive set of CLI libraries and frameworks that can make your life more pleasant and help you build command-line tools quickly:&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/what-can-i-do-with-python/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/what-can-i-do-with-python/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Defining and Calling Python Functions</title>
      <id>https://realpython.com/courses/defining-and-calling-functions/</id>
      <link href="https://realpython.com/courses/defining-and-calling-functions/"/>
      <updated>2021-07-06T14:00:00+00:00</updated>
      <summary>In this course, you&#x27;ll learn how to define and call your own Python function.  You&#x27;ll also learn about passing data to your function and returning data from your function back to its calling environment.</summary>
      <content type="html">
        &lt;p&gt;A &lt;strong&gt;function&lt;/strong&gt; is a self-contained block of code that encapsulates a specific task or related group of tasks. This course will show you how to &lt;strong&gt;define your own Python function&lt;/strong&gt;. You&amp;rsquo;ll learn when to divide your program into separate user-defined functions and what tools you&amp;rsquo;ll need to do this. &lt;/p&gt;
&lt;p&gt;You&amp;rsquo;ll also learn the various ways to pass data into a function when calling it, which allows for different behavior from one invocation to the next.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this course, you&amp;rsquo;ll learn:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;How &lt;strong&gt;functions&lt;/strong&gt; work in Python and why they&amp;rsquo;re beneficial&lt;/li&gt;
&lt;li&gt;How to &lt;strong&gt;define and call&lt;/strong&gt; your own Python function&lt;/li&gt;
&lt;li&gt;Mechanisms for &lt;strong&gt;passing arguments&lt;/strong&gt; to your function&lt;/li&gt;
&lt;li&gt;Some differences between how to work with functions in &lt;strong&gt;Python vs C++&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;How to &lt;strong&gt;return data&lt;/strong&gt; from your function back to the calling environment&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This course will be the most helpful for you if you&amp;rsquo;re already familiar with the fundamental concepts of Python, including &lt;a href=&quot;https://realpython.com/python-data-types/&quot;&gt;basic data types&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python-lists-tuples/&quot;&gt;lists and tuples&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python-dicts/&quot;&gt;dictionaries&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/lessons/import-statement/&quot;&gt;the import statement&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python-conditional-statements/&quot;&gt;conditional statements&lt;/a&gt;, and &lt;a href=&quot;https://realpython.com/python-for-loop/&quot;&gt;for loops&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&#x27;s Counter: The Pythonic Way to Count Objects</title>
      <id>https://realpython.com/python-counter/</id>
      <link href="https://realpython.com/python-counter/"/>
      <updated>2021-07-05T14:00:00+00:00</updated>
      <summary>In this step-by-step tutorial, you&#x27;ll learn how to use Python&#x27;s Counter to count several repeated objects at once.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Counting several repeated objects at once is a common problem in programming. Python offers a bunch of tools and techniques you can use to approach this problem. However, Python’s &lt;strong&gt;&lt;code&gt;Counter&lt;/code&gt;&lt;/strong&gt; from &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; provides a clean, efficient, and Pythonic solution.&lt;/p&gt;
&lt;p&gt;This &lt;a href=&quot;https://realpython.com/python-dicts/&quot;&gt;dictionary&lt;/a&gt; subclass provides efficient counting capabilities out of the box. Understanding &lt;code&gt;Counter&lt;/code&gt; and how to use it efficiently is a convenient skill to have 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;Count &lt;strong&gt;several repeated objects&lt;/strong&gt; at once&lt;/li&gt;
&lt;li&gt;Create counters with Python’s &lt;strong&gt;&lt;code&gt;Counter&lt;/code&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Retrieve the &lt;strong&gt;most common objects&lt;/strong&gt; in a counter&lt;/li&gt;
&lt;li&gt;Update &lt;strong&gt;object counts&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;Counter&lt;/code&gt; to facilitate &lt;strong&gt;further computations&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You’ll also learn about the basics of using &lt;code&gt;Counter&lt;/code&gt; as a &lt;a href=&quot;https://en.wikipedia.org/wiki/Multiset&quot;&gt;multiset&lt;/a&gt;, which is an additional feature of this class 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 Bonus:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/python-mastery-course/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-python-mastery-course&quot; data-focus=&quot;false&quot; markdown=&quot;1&quot;&gt;5 Thoughts On Python Mastery&lt;/a&gt;, a free course for Python developers that shows you the roadmap and the mindset you’ll need to take your Python skills to the next level.&lt;/p&gt;
&lt;/div&gt;
&lt;h2 id=&quot;counting-objects-in-python&quot;&gt;Counting Objects in Python&lt;a class=&quot;headerlink&quot; href=&quot;#counting-objects-in-python&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Sometimes you need to count the objects in a given data source to know how often they occur. In other words, you need to determine their &lt;strong&gt;frequency&lt;/strong&gt;. For example, you might want to know how often a specific item appears in a list or sequence of values. When your list is short, counting the items can be straightforward and quick. However, when you have a long list, counting things can be more challenging.&lt;/p&gt;
&lt;p&gt;To count objects, you typically use a &lt;strong&gt;counter&lt;/strong&gt;, which is an &lt;a href=&quot;https://realpython.com/python-numbers/#integers&quot;&gt;integer variable&lt;/a&gt; with an initial value of zero. Then you increment the counter to reflect the number of times a given object appears in the input data source.&lt;/p&gt;
&lt;p&gt;When you’re counting the occurrences of a single object, you can use a single counter. However, when you need to count several different objects, you have to create as many counters as unique objects you have.&lt;/p&gt;
&lt;p&gt;To count several different objects at once, you can use a Python dictionary. The dictionary &lt;strong&gt;keys&lt;/strong&gt; will store the objects you want to count. The dictionary &lt;strong&gt;values&lt;/strong&gt; will hold the number of repetitions of a given object, or the object’s &lt;strong&gt;count&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;For example, to count the objects in a sequence using a dictionary, you can loop over the sequence, check if the current object isn’t in the dictionary to initialize the counter (key-value pair), and then increment its count accordingly.&lt;/p&gt;
&lt;p&gt;Here’s an example that counts the letters in the word “Mississippi”:&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;word&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;mississippi&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;counter&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;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;letter&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;word&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;letter&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;not&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;counter&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;counter&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;letter&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;0&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;n&quot;&gt;counter&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;letter&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;gp&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;counter&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;{&#x27;m&#x27;: 1, &#x27;i&#x27;: 4, &#x27;s&#x27;: 4, &#x27;p&#x27;: 2}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The &lt;a href=&quot;https://realpython.com/python-for-loop/&quot;&gt;&lt;code&gt;for&lt;/code&gt; loop&lt;/a&gt; iterates over the letters in &lt;code&gt;word&lt;/code&gt;. In each iteration, the &lt;a href=&quot;https://realpython.com/python-conditional-statements/&quot;&gt;conditional statement&lt;/a&gt; checks if the letter at hand isn’t already a key in the dictionary you’re using as &lt;code&gt;counter&lt;/code&gt;. If so, it creates a new key with the letter and initializes its count to zero. The final step is to increment the count by one. When you access &lt;code&gt;counter&lt;/code&gt;, you see that the letters work as keys and the values as counts.&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; When you’re counting several repeated objects with Python dictionaries, keep in mind that they must be &lt;a href=&quot;https://docs.python.org/3/glossary.html#term-hashable&quot;&gt;hashable&lt;/a&gt; because they’ll work as dictionary keys. Being &lt;strong&gt;hashable&lt;/strong&gt; means that your objects must have a hash value that never changes during their lifetime. In Python, &lt;a href=&quot;https://docs.python.org/3/glossary.html#term-immutable&quot;&gt;immutable&lt;/a&gt; objects are also hashable.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Another way to count objects with a dictionary is to use &lt;a href=&quot;https://docs.python.org/3/library/stdtypes.html#dict.get&quot;&gt;&lt;code&gt;dict.get()&lt;/code&gt;&lt;/a&gt; with &lt;code&gt;0&lt;/code&gt; as a default value:&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;word&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;mississippi&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;counter&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;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;letter&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;word&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;counter&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;letter&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;counter&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;letter&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;gp&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;counter&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;{&#x27;m&#x27;: 1, &#x27;i&#x27;: 4, &#x27;s&#x27;: 4, &#x27;p&#x27;: 2}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;When you call &lt;code&gt;.get()&lt;/code&gt; this way, you get the current count of a given &lt;code&gt;letter&lt;/code&gt;, or &lt;code&gt;0&lt;/code&gt; (the default) if the letter is missing. Then you increment the count by &lt;code&gt;1&lt;/code&gt; and store it under the corresponding &lt;code&gt;letter&lt;/code&gt; in the dictionary.&lt;/p&gt;
&lt;p&gt;You can also use &lt;a href=&quot;https://realpython.com/python-defaultdict/&quot;&gt;&lt;code&gt;defaultdict&lt;/code&gt;&lt;/a&gt; from &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; to count objects within a 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;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;collections&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;defaultdict&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;word&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;mississippi&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;counter&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;defaultdict&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;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;letter&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;word&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;counter&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;letter&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;gp&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;counter&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;defaultdict(&amp;lt;class &#x27;int&#x27;&amp;gt;, {&#x27;m&#x27;: 1, &#x27;i&#x27;: 4, &#x27;s&#x27;: 4, &#x27;p&#x27;: 2})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This solution is more concise and readable. You first initialize the &lt;code&gt;counter&lt;/code&gt; using a &lt;code&gt;defaultdict&lt;/code&gt; with &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; as a default factory function. This way, when you access a key that doesn’t exist in the underlying &lt;code&gt;defaultdict&lt;/code&gt;, the dictionary automatically creates the key and initializes it with the value that the factory function returns.&lt;/p&gt;
&lt;p&gt;In this example, since you’re using &lt;code&gt;int()&lt;/code&gt; as a &lt;a href=&quot;https://realpython.com/factory-method-python/&quot;&gt;factory function&lt;/a&gt;, the initial value is &lt;code&gt;0&lt;/code&gt;, which results from calling &lt;code&gt;int()&lt;/code&gt; without arguments.&lt;/p&gt;
&lt;p&gt;Like with many other frequent tasks in programming, Python provides a better way to approach the counting problem. In &lt;code&gt;collections&lt;/code&gt;, you’ll find a class specially designed to count several different objects in one go. This class is conveniently called &lt;a href=&quot;https://docs.python.org/3/library/collections.html#collections.Counter&quot;&gt;&lt;code&gt;Counter&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;getting-started-with-pythons-counter&quot;&gt;Getting Started With Python’s &lt;code&gt;Counter&lt;/code&gt;&lt;a class=&quot;headerlink&quot; href=&quot;#getting-started-with-pythons-counter&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python-counter/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-counter/ »&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 #67: Securing Your Python Software Supply Chain With Dustin Ingram</title>
      <id>https://realpython.com/podcasts/rpp/67/</id>
      <link href="https://realpython.com/podcasts/rpp/67/"/>
      <updated>2021-07-02T12:00:00+00:00</updated>
      <summary>How well do you know your software supply chain? When you PIP install a package, what steps can you take to minimize the risk of installing something malicious? This week on the show, we have Dustin Ingram, a director of the Python Software Foundation (PSF) and a maintainer of the Python Package Index (PyPI).</summary>
      <content type="html">
        &lt;p&gt;How well do you know your software supply chain? When you PIP install a package, what steps can you take to minimize the risk of installing something malicious? This week on the show, we have Dustin Ingram, a director of the Python Software Foundation (PSF) and a maintainer of the Python Package Index (PyPI).&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>Beautiful Soup: Build a Web Scraper With Python</title>
      <id>https://realpython.com/beautiful-soup-web-scraper-python/</id>
      <link href="https://realpython.com/beautiful-soup-web-scraper-python/"/>
      <updated>2021-06-30T12:58:06+00:00</updated>
      <summary>In this tutorial, you&#x27;ll walk through the main steps of the web scraping process. You&#x27;ll learn how to write a script that uses Python&#x27;s requests library to scrape data from a website. You&#x27;ll also use Beautiful Soup to extract the specific pieces of information that you&#x27;re interested in.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;The incredible amount of data on the Internet is a rich resource for any field of research or personal interest. To effectively harvest that data, you’ll need to become skilled at &lt;a href=&quot;https://realpython.com/python-web-scraping-practical-introduction/&quot;&gt;&lt;strong&gt;web scraping&lt;/strong&gt;&lt;/a&gt;. The Python libraries &lt;code&gt;requests&lt;/code&gt; and Beautiful Soup are powerful tools for the job. If you like to learn with hands-on examples and have a basic understanding of Python and HTML, then this tutorial is for you.&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;Inspect the &lt;strong&gt;HTML structure&lt;/strong&gt; of your target site with your browser’s &lt;strong&gt;developer tools&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Decipher data encoded in &lt;strong&gt;URLs&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;requests&lt;/code&gt; and Beautiful Soup for &lt;strong&gt;scraping and parsing data&lt;/strong&gt; from the Web&lt;/li&gt;
&lt;li&gt;Step through a &lt;strong&gt;web scraping pipeline&lt;/strong&gt; from start to finish&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Build a script&lt;/strong&gt; that fetches job offers from the Web and displays relevant information in your console&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Working through this project will give you the knowledge of the process and tools you need to scrape any static website out there on the World Wide Web. You can download the project source code by clicking on 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 Sample Code:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/beautiful-soup/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-beautiful-soup&quot; data-focus=&quot;false&quot; markdown=&quot;1&quot;&gt;Click here to get the sample code you’ll use&lt;/a&gt; for the project and examples in this tutorial.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Let’s get started!&lt;/p&gt;
&lt;h2 id=&quot;what-is-web-scraping&quot;&gt;What Is Web Scraping?&lt;a class=&quot;headerlink&quot; href=&quot;#what-is-web-scraping&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Web scraping&lt;/strong&gt; is the process of gathering information from the Internet. Even copying and pasting the lyrics of your favorite song is a form of web scraping! However, the words “web scraping” usually refer to a process that involves automation. &lt;a href=&quot;https://realpython.com/podcasts/rpp/12/&quot;&gt;Some websites don’t like it when automatic scrapers gather their data&lt;/a&gt;, while others don’t mind.&lt;/p&gt;
&lt;p&gt;If you’re scraping a page respectfully for educational purposes, then you’re unlikely to have any problems. Still, it’s a good idea to do some research on your own and make sure that you’re not &lt;a href=&quot;https://benbernardblog.com/web-scraping-and-crawling-are-perfectly-legal-right/&quot;&gt;violating any Terms of Service&lt;/a&gt; before you start a large-scale project.&lt;/p&gt;
&lt;h3 id=&quot;reasons-for-web-scraping&quot;&gt;Reasons for Web Scraping&lt;a class=&quot;headerlink&quot; href=&quot;#reasons-for-web-scraping&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Say you’re a surfer, both online and in real life, and you’re looking for employment. However, you’re not looking for just &lt;em&gt;any&lt;/em&gt; job. With a surfer’s mindset, you’re waiting for the perfect opportunity to roll your way!&lt;/p&gt;
&lt;p&gt;There’s a job site that offers precisely the kinds of jobs you want. Unfortunately, a new position only pops up once in a blue moon, and the site doesn’t provide an email notification service. You think about checking up on it every day, but that doesn’t sound like the most fun and productive way to spend your time.&lt;/p&gt;
&lt;p&gt;Thankfully, the world offers other ways to apply that surfer’s mindset! Instead of looking at the job site every day, you can use Python to help automate your job search’s repetitive parts. &lt;strong&gt;Automated web scraping&lt;/strong&gt; can be a solution to speed up the data collection process. You write your code once, and it will get the information you want many times and from many pages.&lt;/p&gt;
&lt;p&gt;In contrast, when you try to get the information you want manually, you might spend a lot of time clicking, scrolling, and searching, especially if you need large amounts of data from websites that are regularly updated with new content. Manual web scraping can take a lot of time and repetition.&lt;/p&gt;
&lt;p&gt;There’s so much information on the Web, and new information is constantly added. You’ll probably be interested in at least some of that data, and much of it is just out there for the taking. Whether you’re actually on the job hunt or you want to download all the lyrics of your favorite artist, automated web scraping can help you accomplish your goals.&lt;/p&gt;
&lt;h3 id=&quot;challenges-of-web-scraping&quot;&gt;Challenges of Web Scraping&lt;a class=&quot;headerlink&quot; href=&quot;#challenges-of-web-scraping&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The Web has grown organically out of many sources. It combines many different technologies, styles, and personalities, and it continues to grow to this day. In other words, the Web is a hot mess! Because of this, you’ll run into some challenges when scraping the Web:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Variety:&lt;/strong&gt; Every website is different. While you’ll encounter general structures that repeat themselves, each website is unique and will need personal treatment if you want to extract the relevant information.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Durability:&lt;/strong&gt; Websites constantly change. Say you’ve built a shiny new web scraper that automatically cherry-picks what you want from your resource of interest. The first time you &lt;a href=&quot;https://realpython.com/run-python-scripts/&quot;&gt;run your script&lt;/a&gt;, it works flawlessly. But when you run the same script only a short while later, you run into a discouraging and lengthy stack of &lt;a href=&quot;https://realpython.com/python-traceback/&quot;&gt;tracebacks&lt;/a&gt;!&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Unstable scripts are a realistic scenario, as many websites are in active development. Once the site’s structure has changed, your scraper might not be able to navigate the sitemap correctly or find the relevant information. The good news is that many changes to websites are small and incremental, so you’ll likely be able to update your scraper with only minimal adjustments.&lt;/p&gt;
&lt;p&gt;However, keep in mind that because the Internet is dynamic, the scrapers you’ll build will probably require constant maintenance. You can set up &lt;a href=&quot;https://realpython.com/python-continuous-integration/&quot;&gt;continuous integration&lt;/a&gt; to run scraping tests periodically to ensure that your main script doesn’t break without your knowledge.&lt;/p&gt;
&lt;h3 id=&quot;an-alternative-to-web-scraping-apis&quot;&gt;An Alternative to Web Scraping: APIs&lt;a class=&quot;headerlink&quot; href=&quot;#an-alternative-to-web-scraping-apis&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Some website providers offer &lt;a href=&quot;https://realpython.com/python-api/&quot;&gt;application programming interfaces (APIs)&lt;/a&gt; that allow you to access their data in a predefined manner. With APIs, you can avoid parsing HTML. Instead, you can access the data directly using formats like &lt;a href=&quot;https://realpython.com/python-json/&quot;&gt;JSON&lt;/a&gt; and XML. HTML is primarily a way to present content to users visually.&lt;/p&gt;
&lt;p&gt;When you use an API, the process is generally more stable than gathering the data through web scraping. That’s because developers create APIs to be consumed by programs rather than by human eyes.&lt;/p&gt;
&lt;p&gt;The front-end presentation of a site might change often, but such a change in the website’s design doesn’t affect its API structure. The structure of an API is usually more permanent, which means it’s a more reliable source of the site’s data.&lt;/p&gt;
&lt;p&gt;However, APIs &lt;em&gt;can&lt;/em&gt; change as well. The challenges of both variety and durability apply to APIs just as they do to websites. Additionally, it’s much harder to inspect the structure of an API by yourself if the provided documentation lacks quality.&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/beautiful-soup-web-scraper-python/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/beautiful-soup-web-scraper-python/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Python Inner Functions</title>
      <id>https://realpython.com/courses/python-inner-functions/</id>
      <link href="https://realpython.com/courses/python-inner-functions/"/>
      <updated>2021-06-29T14:00:00+00:00</updated>
      <summary>In this step-by-step course, you&#x27;ll learn what inner functions are in Python, how to define them, and what their main use cases are.</summary>
      <content type="html">
        &lt;p&gt;Python allows the declaration of functions inside of other &lt;a href=&quot;https://realpython.com/defining-your-own-python-function/&quot;&gt;functions&lt;/a&gt;. &lt;strong&gt;Inner functions&lt;/strong&gt;, also known as &lt;strong&gt;nested functions&lt;/strong&gt;, are defined within a function. This type of function has direct access to variables and names defined in the enclosing function in Python. Inner functions have many uses, most notably as closure factories and decorator functions.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this course, you&amp;rsquo;ll learn how to:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Define&lt;/strong&gt; inner functions&lt;/li&gt;
&lt;li&gt;Use inner functions as &lt;strong&gt;helper functions&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Build &lt;strong&gt;function closures&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Use captured variables in a closure&lt;/li&gt;
&lt;li&gt;Use captured data functions in a closure&lt;/li&gt;
&lt;li&gt;Work with &lt;strong&gt;decorators&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Reverse Python Lists: Beyond .reverse() and reversed()</title>
      <id>https://realpython.com/python-reverse-list/</id>
      <link href="https://realpython.com/python-reverse-list/"/>
      <updated>2021-06-28T14:00:00+00:00</updated>
      <summary>In this step-by-step tutorial, you&#x27;ll learn about Python&#x27;s tools and techniques to work with lists in reverse order. You&#x27;ll also learn how to reverse your list by hand.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Are you diving deeper into Python lists and wanting to learn about different ways to reverse them? If so, then this tutorial is for you. Here, you’ll learn about a few Python tools and techniques that are handy when it comes to reversing lists or manipulating them in reverse order. This knowledge will complement and improve your list-related skills and make you more proficient with them.&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;Reverse existing lists &lt;strong&gt;in place&lt;/strong&gt; using &lt;strong&gt;&lt;code&gt;.reverse()&lt;/code&gt;&lt;/strong&gt; and other techniques&lt;/li&gt;
&lt;li&gt;Create reversed copies of existing lists using &lt;strong&gt;&lt;code&gt;reversed()&lt;/code&gt;&lt;/strong&gt; and &lt;strong&gt;slicing&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Use &lt;strong&gt;iteration&lt;/strong&gt;, &lt;strong&gt;comprehensions&lt;/strong&gt;, and &lt;strong&gt;recursion&lt;/strong&gt; to create reversed lists&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Iterate&lt;/strong&gt; over your lists in reverse order&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sort&lt;/strong&gt; your lists in reverse order using &lt;code&gt;.sort()&lt;/code&gt; and &lt;code&gt;sorted()&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To get the most out of this tutorial, it would be helpful to know the basics of &lt;a href=&quot;https://docs.python.org/3/glossary.html#term-iterable&quot;&gt;iterables&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python-for-loop/&quot;&gt;&lt;code&gt;for&lt;/code&gt; loops&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python-lists-tuples/&quot;&gt;lists&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/list-comprehension-python/&quot;&gt;list comprehensions&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/introduction-to-python-generators/#building-generators-with-generator-expressions&quot;&gt;generator expressions&lt;/a&gt;, and &lt;a href=&quot;https://realpython.com/python-recursion/&quot;&gt;recursion&lt;/a&gt;.&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;&lt;p&gt;&lt;strong&gt;Free Bonus:&lt;/strong&gt; &lt;a href=&quot;&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-python-cheat-sheet-shortened&quot; data-focus=&quot;false&quot;&gt;Click here to get a Python Cheat Sheet&lt;/a&gt; and learn the basics of Python 3, like working with data types, dictionaries, lists, and Python functions.&lt;/p&gt;&lt;/div&gt;

&lt;h2 id=&quot;reversing-python-lists&quot;&gt;Reversing Python Lists&lt;a class=&quot;headerlink&quot; href=&quot;#reversing-python-lists&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Sometimes you need to process Python lists starting from the last element down to the first—in other words, in &lt;strong&gt;reverse order&lt;/strong&gt;. In general, there are two main challenges related to working with lists in reverse:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Reversing a list in place&lt;/li&gt;
&lt;li&gt;Creating reversed copies of an existing list&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;To meet the first challenge, you can use either &lt;code&gt;.reverse()&lt;/code&gt; or a loop that swaps items by index. For the second, you can use &lt;a href=&quot;https://docs.python.org/dev/library/functions.html?highlight=built#reversed&quot;&gt;&lt;code&gt;reversed()&lt;/code&gt;&lt;/a&gt; or a &lt;a href=&quot;https://docs.python.org/dev/whatsnew/2.3.html#extended-slices&quot;&gt;slicing operation&lt;/a&gt;. In the next sections, you’ll learn about different ways to accomplish both in your code.&lt;/p&gt;
&lt;h3 id=&quot;reversing-lists-in-place&quot;&gt;Reversing Lists in Place&lt;a class=&quot;headerlink&quot; href=&quot;#reversing-lists-in-place&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Like other &lt;a href=&quot;https://docs.python.org/dev/library/stdtypes.html#mutable-sequence-types&quot;&gt;mutable sequence&lt;/a&gt; types, Python lists implement &lt;code&gt;.reverse()&lt;/code&gt;. This method reverses the underlying list &lt;a href=&quot;https://en.wikipedia.org/wiki/In-place_algorithm&quot;&gt;in place&lt;/a&gt; for memory efficiency when you’re reversing large list objects. Here’s how you can use &lt;code&gt;.reverse()&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;digits&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;0&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;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;mi&quot;&gt;9&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;digits&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;reverse&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;digits&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;[9, 8, 7, 6, 5, 4, 3, 2, 1, 0]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;When you call &lt;code&gt;.reverse()&lt;/code&gt; on an existing list, the method reverses it in place. This way, when you access the list again, you get it in reverse order. Note that &lt;code&gt;.reverse()&lt;/code&gt; doesn’t &lt;a href=&quot;https://realpython.com/python-return-statement/&quot;&gt;return&lt;/a&gt; a new list but &lt;a href=&quot;https://realpython.com/null-in-python/&quot;&gt;&lt;code&gt;None&lt;/code&gt;&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;n&quot;&gt;digits&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;0&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;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;mi&quot;&gt;9&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;reversed_digits&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;digits&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;reverse&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;reversed_digits&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;is&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;None&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;Trying to assign the return value of &lt;code&gt;.reverse()&lt;/code&gt; to a variable is a common mistake related to using this method. The intent of returning &lt;code&gt;None&lt;/code&gt; is to remind its users that &lt;code&gt;.reverse()&lt;/code&gt; operates by &lt;a href=&quot;https://en.wikipedia.org/wiki/Side_effect_(computer_science)&quot;&gt;side effect&lt;/a&gt;, changing the underlying list.&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; Most of the examples in this tutorial use a list of &lt;a href=&quot;https://realpython.com/python-numbers/&quot;&gt;numbers&lt;/a&gt; as input. However, the same tools and techniques apply to lists of any type of Python objects, such as lists of &lt;a href=&quot;https://realpython.com/python-strings/&quot;&gt;strings&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Okay! That was quick and straightforward! Now, how can you reverse a list in place by hand? A common technique is to loop through the first half of it while swapping each element with its mirror counterpart on the second half of the list.&lt;/p&gt;
&lt;p&gt;Python provides zero-based positive indices to walk sequences from left to right. It also allows you to navigate sequences from right to left using negative indices:&lt;/p&gt;
&lt;figure&gt;&lt;a href=&quot;https://files.realpython.com/media/python-list-indices.35560d02fcd4.png&quot; target=&quot;_blank&quot;&gt;&lt;img loading=&quot;lazy&quot; class=&quot;img-fluid mx-auto d-block w-50&quot; src=&quot;https://files.realpython.com/media/python-list-indices.35560d02fcd4.png&quot; width=&quot;404&quot; height=&quot;252&quot; srcset=&quot;https://robocrop.realpython.net/?url=https%3A//files.realpython.com/media/python-list-indices.35560d02fcd4.png&amp;amp;w=101&amp;amp;sig=9c8daf19346603653b9cada7058fa6677b2af970 101w, https://robocrop.realpython.net/?url=https%3A//files.realpython.com/media/python-list-indices.35560d02fcd4.png&amp;amp;w=202&amp;amp;sig=05b1147e011246d6db62cbc3443aaf7df2877a80 202w, https://files.realpython.com/media/python-list-indices.35560d02fcd4.png 404w&quot; sizes=&quot;75vw&quot; alt=&quot;Python list with indices&quot; data-asset=&quot;3581&quot;&gt;&lt;/a&gt;&lt;/figure&gt;

&lt;p&gt;This diagram shows that you can access the first element of the list (or sequence) using either &lt;code&gt;0&lt;/code&gt; or &lt;code&gt;-5&lt;/code&gt; with the indexing operator, like in &lt;code&gt;sequence[0]&lt;/code&gt; and &lt;code&gt;sequence[-5]&lt;/code&gt;, respectively. You can use this Python feature to reverse the underlying sequence in place.&lt;/p&gt;
&lt;p&gt;For example, to reverse the list represented in the diagram, you can loop over the first half of the list and swap the element at index &lt;code&gt;0&lt;/code&gt; with its mirror at index &lt;code&gt;-1&lt;/code&gt; in the first iteration. Then you can switch the element at index &lt;code&gt;1&lt;/code&gt; with its mirror at index &lt;code&gt;-2&lt;/code&gt; and so on until you get the list reversed.&lt;/p&gt;
&lt;p&gt;Here’s a representation of the whole process:&lt;/p&gt;
&lt;figure&gt;&lt;a href=&quot;https://files.realpython.com/media/python-reverse-list.220302c8f5a4.gif&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/python-reverse-list.220302c8f5a4.gif&quot; width=&quot;400&quot; height=&quot;150&quot; srcset=&quot;https://files.realpython.com/media/python-reverse-list.220302c8f5a4.gif 100w, https://files.realpython.com/media/python-reverse-list.220302c8f5a4.gif 200w, https://files.realpython.com/media/python-reverse-list.220302c8f5a4.gif 400w&quot; sizes=&quot;75vw&quot; alt=&quot;Reverse Lists in Python&quot; data-asset=&quot;3582&quot;&gt;&lt;/a&gt;&lt;/figure&gt;

&lt;p&gt;To translate this process into code, you can use a &lt;a href=&quot;https://realpython.com/python-for-loop/&quot;&gt;&lt;code&gt;for&lt;/code&gt; loop&lt;/a&gt; with a &lt;a href=&quot;https://realpython.com/python-range/&quot;&gt;&lt;code&gt;range&lt;/code&gt;&lt;/a&gt; object over the first half of the list, which you can get with &lt;code&gt;len(digits) // 2&lt;/code&gt;. Then you can use a parallel assignment statement to swap the elements, like this:&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;digits&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;0&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;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;mi&quot;&gt;9&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;i&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;nb&quot;&gt;len&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;digits&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;2&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;digits&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;digits&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;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;i&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;digits&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;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;digits&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i&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;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;digits&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;[9, 8, 7, 6, 5, 4, 3, 2, 1, 0]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python-reverse-list/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-reverse-list/ »&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 #66: Practicing Python With CSV Files and Extracting Values With &quot;filter()&quot;</title>
      <id>https://realpython.com/podcasts/rpp/66/</id>
      <link href="https://realpython.com/podcasts/rpp/66/"/>
      <updated>2021-06-25T12:00:00+00:00</updated>
      <summary>Are you ready to practice your Python skills some more? There is a new set of practice problems prepared for you to tackle, and this time they&#x27;re based on working with CSV files. This week on the show, David Amos is back, and he&#x27;s brought another batch of PyCoder&#x27;s Weekly articles and projects.</summary>
      <content type="html">
        &lt;p&gt;Are you ready to practice your Python skills some more? There is a new set of practice problems prepared for you to tackle, and this time they&#x27;re based on working with CSV files. This week on the show, David Amos is back, and he&#x27;s brought 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>CPython Internals: Paperback Now Available!</title>
      <id>https://realpython.com/cpython-internals-paperback/</id>
      <link href="https://realpython.com/cpython-internals-paperback/"/>
      <updated>2021-06-23T14:00:00+00:00</updated>
      <summary>After almost two years of writing, reviewing, and testing, we&#x27;re delighted to announce that CPython Internals: Your Guide to the Python 3 Interpreter is available in paperback! In this article, you&#x27;ll see how the book can help you take your Python skills to the next level.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;After almost two years of writing, reviewing, and testing, we’re delighted to announce that &lt;em&gt;CPython Internals: Your Guide to the Python 3 Interpreter&lt;/em&gt; is now available in paperback!&lt;/p&gt;
&lt;p&gt;Are there certain parts of Python that just seem like magic? Once you see how Python works at the interpreter level, you’ll be able to optimize your applications and fully leverage the power of Python.&lt;/p&gt;
&lt;p&gt;In &lt;em&gt;CPython Internals&lt;/em&gt;, you’ll unlock the &lt;strong&gt;inner workings&lt;/strong&gt; of the Python language, learn how to &lt;strong&gt;compile&lt;/strong&gt; the Python &lt;strong&gt;interpreter&lt;/strong&gt; from &lt;strong&gt;source code&lt;/strong&gt;, and cover what you’ll need to know to confidently start &lt;strong&gt;contributing to CPython&lt;/strong&gt; yourself!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this article, you’ll see:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;How you can take your Python skills to the &lt;strong&gt;next level&lt;/strong&gt; with &lt;em&gt;CPython Internals&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;How other Pythonistas have &lt;strong&gt;already&lt;/strong&gt; been doing it&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To skip right to the good stuff and get your hands on the book, click the link below:&lt;/p&gt;
&lt;div class=&quot;text-center my-4&quot;&gt;
  &lt;a href=&quot;https://realpython.com/asins/1775093344/&quot; class=&quot;btn btn-lg btn-primary px-5&quot;&gt;Buy on &lt;strong&gt;Amazon&lt;/strong&gt; »&lt;/a&gt;
&lt;/div&gt;

&lt;h2 id=&quot;you-can-get-cpython-internals-in-paperback&quot;&gt;You Can Get CPython Internals in Paperback!&lt;a class=&quot;headerlink&quot; href=&quot;#you-can-get-cpython-internals-in-paperback&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;It’s finally here! Readers have been showing us their copies and letting us know what they think:&lt;/p&gt;
&lt;figure&gt;&lt;a href=&quot;https://files.realpython.com/media/CPython_cover.d957adbf1a7c.jpg&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/CPython_cover.d957adbf1a7c.jpg&quot; width=&quot;2000&quot; height=&quot;1125&quot; srcset=&quot;https://robocrop.realpython.net/?url=https%3A//files.realpython.com/media/CPython_cover.d957adbf1a7c.jpg&amp;amp;w=500&amp;amp;sig=e24d7258b7c5fb6b9e20fc9ed4e71b7be7c685cd 500w, https://robocrop.realpython.net/?url=https%3A//files.realpython.com/media/CPython_cover.d957adbf1a7c.jpg&amp;amp;w=1000&amp;amp;sig=4368c619b9561abb3ee6744ed4908fb6d25e1403 1000w, https://files.realpython.com/media/CPython_cover.d957adbf1a7c.jpg 2000w&quot; sizes=&quot;75vw&quot; alt=&quot;Front cover of CPython Internals: Your Guide to the Python 3 Interpreter&quot; data-asset=&quot;3776&quot;&gt;&lt;/a&gt;&lt;/figure&gt;

&lt;p&gt;This book is a sort of “missing manual” for CPython’s internals, and we’re looking forward to the Python community getting tons of knowledge and skills from this unique resource. We’re delighted with the final product, so here’s the author, Anthony Shaw, to walk you through the paperback version of the book:&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/cpython-internals-paperback/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/cpython-internals-paperback/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Python vs JavaScript for Python Developers</title>
      <id>https://realpython.com/courses/python-vs-javascript-for-python-devs/</id>
      <link href="https://realpython.com/courses/python-vs-javascript-for-python-devs/"/>
      <updated>2021-06-22T14:00:00+00:00</updated>
      <summary>Python and JavaScript are two of the most popular programming languages in the world. In this course, you&#x27;ll take a deep dive into the JavaScript ecosystem by comparing Python vs JavaScript. You&#x27;ll learn the jargon, language history, and best practices from a Pythonista&#x27;s perspective.</summary>
      <content type="html">
        &lt;p&gt;Python isn&amp;rsquo;t the only language out there, and one of the other languages frequently fighting Python for the top of the &amp;ldquo;most popular&amp;rdquo; lists is &lt;strong&gt;JavaScript&lt;/strong&gt;. JavaScript is the de facto language on the web but also has a robust toolset on the server side. This course explores JavaScript from a Python programmer&amp;rsquo;s perspective.&lt;/p&gt;
&lt;p&gt;If you&amp;rsquo;ve never used JavaScript before or have felt overwhelmed by the quick pace of its evolution in recent years, then this course will set you on the right path. You should already know the &lt;a href=&quot;https://realpython.com/products/python-basics-book/&quot;&gt;basics of Python&lt;/a&gt; to benefit fully from the comparisons made between the two languages.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this course, you will learn:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Where JavaScript comes from and where it is used&lt;/li&gt;
&lt;li&gt;How JavaScript&amp;rsquo;s &lt;strong&gt;type system&lt;/strong&gt; is different from Python&amp;rsquo;s&lt;/li&gt;
&lt;li&gt;How to write &lt;strong&gt;functions&lt;/strong&gt; in JavaScript&lt;/li&gt;
&lt;li&gt;The two ways of creating &lt;strong&gt;objects&lt;/strong&gt; in JavaScript&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;General language syntax&lt;/strong&gt; in JavaScript&lt;/li&gt;
&lt;li&gt;Surprises and behaviors in JavaScript that Python programmers wouldn&amp;rsquo;t expect&lt;/li&gt;
&lt;/ul&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Simplify Complex Numbers With Python</title>
      <id>https://realpython.com/python-complex-numbers/</id>
      <link href="https://realpython.com/python-complex-numbers/"/>
      <updated>2021-06-21T14:00:00+00:00</updated>
      <summary>In this tutorial, you&#x27;ll learn about the unique treatment of complex numbers in Python. Complex numbers are a convenient tool for solving scientific and engineering problems. You&#x27;ll experience the elegance of using complex numbers in Python with several hands-on examples.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Most general-purpose programming languages have either no support or limited support for &lt;strong&gt;complex numbers&lt;/strong&gt;. Your typical options are learning some specialized tool like &lt;a href=&quot;https://realpython.com/matlab-vs-python/&quot;&gt;MATLAB&lt;/a&gt; or finding a third-party library. Python is a rare exception because it comes with complex numbers built in.&lt;/p&gt;
&lt;p&gt;Despite the name, complex numbers aren’t complicated! They’re convenient in tackling practical problems that you’ll get a taste of in this tutorial. You’ll explore &lt;strong&gt;vector graphics&lt;/strong&gt; and &lt;strong&gt;sound frequency analysis&lt;/strong&gt;, but complex numbers can also help in drawing &lt;strong&gt;fractals&lt;/strong&gt;, for example.&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;Define complex numbers with &lt;strong&gt;literals&lt;/strong&gt; in Python&lt;/li&gt;
&lt;li&gt;Represent complex numbers in &lt;strong&gt;rectangular&lt;/strong&gt; and &lt;strong&gt;polar&lt;/strong&gt; coordinates&lt;/li&gt;
&lt;li&gt;Use complex numbers in &lt;strong&gt;arithmetic&lt;/strong&gt; expressions&lt;/li&gt;
&lt;li&gt;Take advantage of the built-in &lt;strong&gt;&lt;code&gt;cmath&lt;/code&gt; module&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Translate &lt;strong&gt;mathematical formulas&lt;/strong&gt; directly to Python code&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you need a quick refresher or a gentle introduction to the theory of complex numbers, then you can watch &lt;a href=&quot;https://youtu.be/SP-YJe7Vldo&quot;&gt;Khan Academy’s video series&lt;/a&gt;. To download the sample code used throughout this tutorial, click 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 Sample Code:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/python-complex-numbers-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-python-complex-numbers-code&quot; data-focus=&quot;false&quot; markdown=&quot;1&quot;&gt;Click here to get the sample code you’ll use&lt;/a&gt; to learn about complex numbers in Python in this tutorial.&lt;/p&gt;
&lt;/div&gt;
&lt;h2 id=&quot;creating-complex-numbers-in-python&quot;&gt;Creating Complex Numbers in Python&lt;a class=&quot;headerlink&quot; href=&quot;#creating-complex-numbers-in-python&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Creating and manipulating complex numbers in Python isn’t much different from other built-in data types, particularly numeric types. It’s possible because the language treats them as &lt;a href=&quot;https://en.wikipedia.org/wiki/First-class_citizen&quot;&gt;first-class citizens&lt;/a&gt;. This means you can express mathematical formulas that involve complex numbers with little overhead.&lt;/p&gt;
&lt;p&gt;Python lets you use complex numbers in arithmetic expressions and call &lt;a href=&quot;https://realpython.com/defining-your-own-python-function/&quot;&gt;functions&lt;/a&gt; on them just like you would with other &lt;a href=&quot;https://realpython.com/python-numbers/&quot;&gt;numbers in Python&lt;/a&gt;. It leads to elegant syntax that reads almost like a math textbook.&lt;/p&gt;
&lt;h3 id=&quot;complex-number-literal&quot;&gt;Complex Number Literal&lt;a class=&quot;headerlink&quot; href=&quot;#complex-number-literal&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The quickest way to define a complex number in Python is by typing its &lt;a href=&quot;https://en.wikipedia.org/wiki/Literal_(computer_programming)&quot;&gt;literal&lt;/a&gt; directly in the source code:&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;z&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;j&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Although this looks like an algebraic formula, the expression to the right of the equals sign is already a fixed value that needs no further evaluation. When you check its type, you’ll confirm that it’s indeed a complex 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;nb&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;z&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&amp;lt;class &#x27;complex&#x27;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;How is that different from &lt;em&gt;adding&lt;/em&gt; two numbers with the plus &lt;a href=&quot;https://realpython.com/python-operators-expressions/&quot;&gt;operator&lt;/a&gt;? A clear giveaway is the letter &lt;code&gt;j&lt;/code&gt; glued to the second number, which completely changes the meaning of the expression. If you removed the letter, you’d get a familiar integer result instead:&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;z&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;

&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;z&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&amp;lt;class &#x27;int&#x27;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;By the way, you can use floating-point numbers to create complex numbers, too:&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;z&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;3.14&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;2.71&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;j&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;type&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;z&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&amp;lt;class &#x27;complex&#x27;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Complex number literals in Python mimic the mathematical notation, which is also known as the &lt;strong&gt;standard form&lt;/strong&gt;, the &lt;strong&gt;algebraic form&lt;/strong&gt;, or sometimes the &lt;strong&gt;canonical form&lt;/strong&gt;, of a complex number. In Python, you can use either lowercase &lt;code&gt;j&lt;/code&gt; or uppercase &lt;code&gt;J&lt;/code&gt; in those literals.&lt;/p&gt;
&lt;p&gt;If you learned about complex numbers in math class, you might have seen them expressed using an &lt;code&gt;i&lt;/code&gt; instead of a &lt;code&gt;j&lt;/code&gt;. If you’re curious about why Python uses &lt;code&gt;j&lt;/code&gt; instead of &lt;code&gt;i&lt;/code&gt;, then you can expand the collapsible section below to learn more.&lt;/p&gt;
&lt;div class=&quot;card mb-3&quot; id=&quot;collapse_card122b47&quot;&gt;
&lt;div class=&quot;card-header border-0&quot;&gt;
&lt;p class=&quot;m-0&quot;&gt;&lt;button class=&quot;btn w-100&quot; data-toggle=&quot;collapse&quot; data-target=&quot;#collapse122b47&quot; aria-expanded=&quot;false&quot; aria-controls=&quot;collapse122b47&quot; markdown=&quot;1&quot;&gt;&lt;span class=&quot;float-left&quot; markdown=&quot;1&quot;&gt;Why &lt;code&gt;j&lt;/code&gt; Instead of &lt;code&gt;i&lt;/code&gt;?&lt;/span&gt;&lt;span class=&quot;float-right text-muted&quot;&gt;Show/Hide&lt;/span&gt;&lt;/button&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;collapse js-collapsible-section&quot; data-parent=&quot;#collapse_card122b47&quot; id=&quot;collapse122b47&quot;&gt;
&lt;div class=&quot;card-body&quot;&gt;
&lt;p&gt;The traditional notation for complex numbers uses the letter &lt;code&gt;i&lt;/code&gt; instead of &lt;code&gt;j&lt;/code&gt; since it stands for the &lt;strong&gt;imaginary unit&lt;/strong&gt;. You might feel a slight discomfort with Python’s convention if you have a mathematical background. However, there are a few reasons that can justify Python’s controversial choice:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;It’s a convention already adopted by engineers to avoid name collisions with electric current, which is denoted with the letter &lt;code&gt;i&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;In computing, the letter &lt;code&gt;i&lt;/code&gt; is often used for the indexing variable in loops.&lt;/li&gt;
&lt;li&gt;The letter &lt;code&gt;i&lt;/code&gt; can be easily confused with &lt;code&gt;l&lt;/code&gt; or &lt;code&gt;1&lt;/code&gt; in source code.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This was brought up on Python’s bug tracker over a decade ago, and Python’s creator, Guido van Rossum himself, closed the issue with this comment:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;This will not be fixed. For one thing, the letter ‘i’ or upper case ‘I’ look too much like digits. The way numbers are parsed either by the language parser (in source code) or by the built-in functions (int, float, complex) should not be localizable or configurable in any way; that’s asking for huge disappointments down the road. If you want to parse complex numbers using ‘i’ instead of ‘j’, you have plenty of solutions available already. (&lt;a href=&quot;https://bugs.python.org/issue10562#msg148083&quot;&gt;Source&lt;/a&gt;)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;So there you have it. Unless you want to start using MATLAB, you’ll have to live with using &lt;code&gt;j&lt;/code&gt; to denote your complex numbers.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The algebraic form of a complex number follows the standard rules of algebra, which is convenient in performing arithmetic. For example, addition has a &lt;a href=&quot;https://en.wikipedia.org/wiki/Commutative_property&quot;&gt;commutative property&lt;/a&gt;, which lets you swap the order of the two parts of a complex number literal without changing its value:&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;3&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;j&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;j&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;True&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Similarly, you can substitute addition for subtraction in a complex number literal because the minus sign is just a shorthand notation for an equivalent form:&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;3&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;j&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&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;2&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;j&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;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python-complex-numbers/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-complex-numbers/ »&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 #65: Expanding the International Python Community With the PSF</title>
      <id>https://realpython.com/podcasts/rpp/65/</id>
      <link href="https://realpython.com/podcasts/rpp/65/"/>
      <updated>2021-06-18T12:00:00+00:00</updated>
      <summary>The popularity of Python is continuing to grow Developers across the globe are embracing the language. How is Python being used in all of these different countries? How does an organization like the Python Software Foundation (PSF) work toward the goals in its mission statement for supporting and growing this international community? This week on the show, we have Marlene Mhangami, a PSF board member and part of the Diversity and Inclusion Work Group.</summary>
      <content type="html">
        &lt;p&gt;The popularity of Python is continuing to grow Developers across the globe are embracing the language. How is Python being used in all of these different countries? How does an organization like the Python Software Foundation (PSF) work toward the goals in its mission statement for supporting and growing this international community? This week on the show, we have Marlene Mhangami, a PSF board member and part of the Diversity and Inclusion Work Group.&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>Working With Linear Systems in Python With scipy.linalg</title>
      <id>https://realpython.com/python-scipy-linalg/</id>
      <link href="https://realpython.com/python-scipy-linalg/"/>
      <updated>2021-06-16T14:00:00+00:00</updated>
      <summary>In this tutorial, you&#x27;ll learn how to apply linear algebra concepts to practical problems, how to work with vectors and matrices using Python and NumPy, how to model practical problems using linear systems, and how to solve linear systems using scipy.linalg.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;&lt;strong&gt;Linear algebra&lt;/strong&gt; is widely used across a variety of subjects, and you can use it to solve many problems once you organize the information using concepts like &lt;strong&gt;vectors&lt;/strong&gt; and &lt;strong&gt;linear equations&lt;/strong&gt;. In Python, most of the routines related to this subject are implemented in &lt;a href=&quot;https://docs.scipy.org/doc/scipy/reference/linalg.html&quot;&gt;&lt;code&gt;scipy.linalg&lt;/code&gt;&lt;/a&gt;, which offers very fast linear algebra capabilities.&lt;/p&gt;
&lt;p&gt;In particular, &lt;strong&gt;linear systems&lt;/strong&gt; play an important role in modeling a variety of real-world problems, and &lt;code&gt;scipy.linalg&lt;/code&gt; provides tools to study and solve them in an efficient way.&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;Apply &lt;strong&gt;linear algebra concepts&lt;/strong&gt; to practical problems using &lt;strong&gt;&lt;code&gt;scipy.linalg&lt;/code&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Work with &lt;strong&gt;vectors&lt;/strong&gt; and &lt;strong&gt;matrices&lt;/strong&gt; using Python and NumPy&lt;/li&gt;
&lt;li&gt;Model practical problems using &lt;strong&gt;linear systems&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;How to solve linear systems using &lt;strong&gt;&lt;code&gt;scipy.linalg&lt;/code&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Let’s get started!&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;&lt;p&gt;&lt;strong&gt;Free Bonus:&lt;/strong&gt; &lt;a href=&quot;#&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-numpy-learning-guide&quot; data-focus=&quot;false&quot;&gt;Click here to get access to a free NumPy Resources Guide&lt;/a&gt; that points you to the best tutorials, videos, and books for improving your NumPy skills.&lt;/p&gt;&lt;/div&gt;

&lt;h2 id=&quot;getting-started-with-scipylinalg&quot;&gt;Getting Started With &lt;code&gt;scipy.linalg&lt;/code&gt;&lt;a class=&quot;headerlink&quot; href=&quot;#getting-started-with-scipylinalg&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://www.scipy.org/scipylib/index.html&quot;&gt;SciPy&lt;/a&gt; is as an open source Python library used for scientific computing, including several modules for common tasks in science and engineering such as &lt;a href=&quot;https://docs.scipy.org/doc/scipy/reference/linalg.html&quot;&gt;linear algebra&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python-scipy-cluster-optimize/&quot;&gt;optimization&lt;/a&gt;, &lt;a href=&quot;https://docs.scipy.org/doc/scipy/reference/tutorial/integrate.html&quot;&gt;integration&lt;/a&gt;, &lt;a href=&quot;https://docs.scipy.org/doc/scipy/reference/interpolate.html&quot;&gt;interpolation&lt;/a&gt;, and &lt;a href=&quot;https://realpython.com/python-scipy-fft/&quot;&gt;signal processing&lt;/a&gt;. It’s part of the &lt;a href=&quot;https://www.scipy.org/&quot;&gt;SciPy stack&lt;/a&gt;, which includes several other packages for scientific computing such as &lt;a href=&quot;https://realpython.com/numpy-tutorial/&quot;&gt;NumPy&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python-matplotlib-guide/&quot;&gt;Matplotlib&lt;/a&gt;, &lt;a href=&quot;https://www.sympy.org/&quot;&gt;SymPy&lt;/a&gt;, &lt;a href=&quot;https://ipython.org/&quot;&gt;IPython&lt;/a&gt;, and &lt;a href=&quot;https://realpython.com/learning-paths/pandas-data-science/&quot;&gt;pandas&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Linear_algebra&quot;&gt;Linear algebra&lt;/a&gt; is a branch of mathematics that concerns linear equations and their representations using &lt;a href=&quot;https://en.wikipedia.org/wiki/Vector_(mathematics_and_physics)&quot;&gt;vectors&lt;/a&gt; and &lt;a href=&quot;https://en.wikipedia.org/wiki/Matrix_(mathematics)&quot;&gt;matrices&lt;/a&gt;. It’s a fundamental subject used in several areas of engineering, and it’s a prerequisite to a deeper understanding of &lt;a href=&quot;https://realpython.com/learning-paths/machine-learning-python/&quot;&gt;machine learning&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;scipy.linalg&lt;/code&gt;&lt;/strong&gt; includes several tools for working with linear algebra problems, including functions for performing matrix calculations, such as determinants, inverses, &lt;a href=&quot;https://en.wikipedia.org/wiki/Eigenvalues_and_eigenvectors&quot;&gt;eigenvalues, eigenvectors&lt;/a&gt;, and the &lt;a href=&quot;https://en.wikipedia.org/wiki/Singular_value_decomposition&quot;&gt;singular value decomposition&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In this tutorial, you’re going to use some of the functions from &lt;code&gt;scipy.linalg&lt;/code&gt; to work on practical problems involving linear systems. In order to use &lt;code&gt;scipy.linalg&lt;/code&gt;, you have to install and set up the SciPy library, which you can do by using the &lt;a href=&quot;https://www.anaconda.com/products/individual&quot;&gt;Anaconda&lt;/a&gt; Python distribution and the &lt;a href=&quot;https://docs.conda.io/projects/conda/en/latest/user-guide/getting-started.html&quot;&gt;conda&lt;/a&gt; package and environment management system.&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; To learn more about Anaconda and conda, check out &lt;a href=&quot;https://realpython.com/python-windows-machine-learning-setup/&quot;&gt;Setting Up Python for Machine Learning on Windows&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;To begin, create a conda environment and activate it:&lt;/p&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;conda create --name linalg
&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;conda activate linalg
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;After you activate the conda environment, your prompt will show its name, &lt;code&gt;linalg&lt;/code&gt;. Then you can install the necessary packages inside the environment:&lt;/p&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 gp-VirtualEnv&quot;&gt;(linalg)&lt;/span&gt; &lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;conda install scipy jupyter
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;After you execute this command, it should take a while for the system to figure out the dependencies and proceed with the installation.&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; Besides SciPy, you’re going to use &lt;a href=&quot;https://jupyter.org/&quot;&gt;Jupyter Notebook&lt;/a&gt; to run the code in an interactive environment. Doing so isn’t mandatory, but it facilitates working with numerical and scientific applications. &lt;/p&gt;
&lt;p&gt;For a refresher on working with Jupyter Notebooks, take a look at &lt;a href=&quot;https://realpython.com/jupyter-notebook-introduction/&quot;&gt;Jupyter Notebook: An Introduction&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;If you prefer to follow along with the article using a different Python distribution and the &lt;a href=&quot;https://realpython.com/what-is-pip/&quot;&gt;&lt;code&gt;pip&lt;/code&gt; package manager&lt;/a&gt;, then expand the collapsible section below to see how to set up your environment.&lt;/p&gt;
&lt;div class=&quot;card mb-3&quot; id=&quot;collapse_cardaaac1f&quot;&gt;
&lt;div class=&quot;card-header border-0&quot;&gt;
&lt;p class=&quot;m-0&quot;&gt;&lt;button class=&quot;btn w-100&quot; data-toggle=&quot;collapse&quot; data-target=&quot;#collapseaaac1f&quot; aria-expanded=&quot;false&quot; aria-controls=&quot;collapseaaac1f&quot; markdown=&quot;1&quot;&gt;&lt;span class=&quot;float-left&quot; markdown=&quot;1&quot;&gt;Setting Up the Environment Using &lt;code&gt;pip&lt;/code&gt;&lt;/span&gt;&lt;span class=&quot;float-right text-muted&quot;&gt;Show/Hide&lt;/span&gt;&lt;/button&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;collapse js-collapsible-section&quot; data-parent=&quot;#collapse_cardaaac1f&quot; id=&quot;collapseaaac1f&quot;&gt;
&lt;div class=&quot;card-body&quot;&gt;
&lt;p&gt;First, it’s recommended to create a &lt;a href=&quot;https://realpython.com/python-virtual-environments-a-primer/&quot;&gt;virtual environment&lt;/a&gt; in which you’ll install the packages. Assuming you have Python installed, you can create a virtual environment named &lt;code&gt;linalg&lt;/code&gt;:&lt;/p&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 linalg
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;After creating the environment, you need to activate it so that you can use &lt;code&gt;pip&lt;/code&gt; to install packages in the environment. If you’re on Linux or macOS, then you can activate the environment with the command:&lt;/p&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;&lt;span class=&quot;nb&quot;&gt;source&lt;/span&gt; ./linalg/bin/activate
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;On Windows, the command you have to use is slightly different:&lt;/p&gt;
&lt;div class=&quot;highlight doscon&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;C:&amp;gt;&lt;/span&gt; \linalg\Scripts\activate.bat
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;After you activate the conda environment, your prompt will show its name, &lt;code&gt;linalg&lt;/code&gt;. Then you can install the necessary packages inside the environment using &lt;code&gt;pip&lt;/code&gt;:&lt;/p&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 gp-VirtualEnv&quot;&gt;(linalg)&lt;/span&gt; &lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;python -m pip install scipy jupyter
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The system will take a while to figure out the dependencies and proceed with the installation. After the command finishes, you’re all set to open Jupyter and use &lt;code&gt;scipy.linalg&lt;/code&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Before opening Jupyter Notebook, you need to register the conda &lt;code&gt;linalg&lt;/code&gt; environment so that you can create Notebooks using it as the kernel. To do that, with the &lt;code&gt;linalg&lt;/code&gt; environment activated, run the following command:&lt;/p&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 gp-VirtualEnv&quot;&gt;(linalg)&lt;/span&gt; &lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;python -m ipykernel install --user --name linalg
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Now you can open Jupyter Notebook by running the following command:&lt;/p&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;jupyter notebook
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;After Jupyter loads in your browser, create a new Notebook by clicking &lt;em&gt;New&lt;/em&gt; → &lt;em&gt;linalg&lt;/em&gt;, as shown below:&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python-scipy-linalg/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-scipy-linalg/ »&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 Pandas to Make a Gradebook in Python</title>
      <id>https://realpython.com/courses/gradebook-using-pandas-python/</id>
      <link href="https://realpython.com/courses/gradebook-using-pandas-python/"/>
      <updated>2021-06-15T14:00:00+00:00</updated>
      <summary>With this Python project, you&#x27;ll build a script to calculate grades for a class using pandas. The script will quickly and accurately calculate grades from a variety of data sources. You&#x27;ll see examples of loading, merging, and saving data with pandas, as well as plotting some summary statistics.</summary>
      <content type="html">
        &lt;p&gt;One of the jobs that all teachers have in common is &lt;strong&gt;evaluating students&lt;/strong&gt;. Whether you use exams, homework assignments, quizzes, or projects, you usually have to turn students&amp;rsquo; scores into a &lt;strong&gt;letter grade&lt;/strong&gt; at the end of the term. This often involves a bunch of calculations that you might do in a spreadsheet. Instead, you can consider using Python and &lt;a href=&quot;https://realpython.com/pandas-python-explore-dataset/&quot;&gt;pandas&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this course, you&amp;rsquo;ll learn how to&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Load&lt;/strong&gt; and &lt;strong&gt;merge&lt;/strong&gt; data from multiple sources with pandas&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Filter&lt;/strong&gt; and &lt;strong&gt;group&lt;/strong&gt; data in a pandas DataFrame&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Calculate&lt;/strong&gt; and &lt;strong&gt;plot&lt;/strong&gt; grades in a pandas DataFrame&lt;/li&gt;
&lt;/ul&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Python Practice Problems: Parsing CSV Files</title>
      <id>https://realpython.com/python-interview-problem-parsing-csv-files/</id>
      <link href="https://realpython.com/python-interview-problem-parsing-csv-files/"/>
      <updated>2021-06-14T20:08:22+00:00</updated>
      <summary>In this tutorial, you&#x27;ll prepare for future interviews by working through a set of Python practice problems that involve CSV files. You&#x27;ll work through the problems yourself and then compare your results with solutions developed by the Real Python team.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Are you a developer looking for some practice with &lt;strong&gt;comma-separated values (CSV) files&lt;/strong&gt; before an upcoming interview? This tutorial will lead you through a series of Python CSV practice problems to help you get ready.&lt;/p&gt;
&lt;p&gt;This tutorial is aimed at intermediate Python developers. It assumes a &lt;a href=&quot;https://realpython.com/products/python-basics-book/&quot;&gt;basic knowledge of Python&lt;/a&gt; and working with &lt;a href=&quot;https://realpython.com/python-csv/&quot;&gt;CSV files&lt;/a&gt;. Like &lt;a href=&quot;https://realpython.com/python-practice-problems/&quot;&gt;other practice problem tutorials&lt;/a&gt;, each of the problems listed here shows the problem description. You’ll see the problem statement first and then have a chance to develop your own solution.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this tutorial, you’ll explore:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Writing code&lt;/strong&gt; for working with CSV files&lt;/li&gt;
&lt;li&gt;Doing &lt;strong&gt;test-driven development&lt;/strong&gt; with pytest&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Discussing your solutions&lt;/strong&gt; and possible enhancements&lt;/li&gt;
&lt;li&gt;The trade-offs between the built-in CSV module and &lt;strong&gt;pandas&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can get skeleton code with failing unit tests for each of the problems you’ll see 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/interview-parsing-csv-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-interview-parsing-csv-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 practice parsing CSV files in this tutorial.&lt;/p&gt;
&lt;/div&gt;
&lt;h2 id=&quot;python-csv-parsing-football-scores&quot;&gt;Python CSV Parsing: Football Scores&lt;a class=&quot;headerlink&quot; href=&quot;#python-csv-parsing-football-scores&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Your first problem deals with &lt;a href=&quot;https://en.wikipedia.org/wiki/Premier_League&quot;&gt;English Premier League&lt;/a&gt; team standings. You don’t need any special football knowledge to solve this, just Python!&lt;/p&gt;
&lt;p&gt;As you work through the problem, try to write more unit tests for each bit of functionality and &lt;em&gt;then&lt;/em&gt; write the functionality to make the tests pass. This is known as &lt;a href=&quot;https://realpython.com/courses/test-driven-development-pytest/&quot;&gt;test-driven development&lt;/a&gt;, and it can be a great way to show off not only your coding but also your testing chops!&lt;/p&gt;
&lt;h3 id=&quot;problem-description&quot;&gt;Problem Description&lt;a class=&quot;headerlink&quot; href=&quot;#problem-description&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;For this round of the problem, stick to the standard library &lt;code&gt;csv&lt;/code&gt; module. You’ll get another shot at it using &lt;a href=&quot;https://pandas.pydata.org/&quot;&gt;pandas&lt;/a&gt; later. Here’s your first problem:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Find the Minimum Goal Differential&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Write a program that takes a filename on the command line and processes the contents of a CSV file. The contents will be the end-of-season football standings for the English Premier League. Your program should determine which team had the smallest goal differential that season.&lt;/p&gt;
&lt;p&gt;The first line of the CSV file will be column headers, with each subsequent line showing the data for one team:&lt;/p&gt;
&lt;div class=&quot;highlight csv&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;Team,Games,Wins,Losses,Draws,Goals For,Goals Against
Arsenal,38,26,9,3,79,36
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The columns labeled &lt;code&gt;Goals For&lt;/code&gt; and &lt;code&gt;Goals Against&lt;/code&gt; contain the total number of goals scored for and against each team in that season. (So Arsenal scored 79 goals and had 36 goals scored against them.)&lt;/p&gt;
&lt;p&gt;Write a program to read the file, then print the name of the team with the smallest difference in &lt;code&gt;Goals For&lt;/code&gt; and &lt;code&gt;Goals Against&lt;/code&gt;. Create unit tests with pytest to test your program.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;There is a single unit test supplied in the skeleton code that tests the problem statement that you’ll see later. You can add more as you write your solution. There are also two &lt;a href=&quot;https://realpython.com/pytest-python-testing/#fixtures-managing-state-and-dependencies&quot;&gt;pytest fixtures&lt;/a&gt; given:&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;# test_football_v1.py&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;pytest&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;football_v1&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;fb&lt;/span&gt;

&lt;span class=&quot;nd&quot;&gt;@pytest&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;fixture&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;mock_csv_data&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;():&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;
        &lt;span class=&quot;s2&quot;&gt;&quot;Team,Games,Wins,Losses,Draws,Goals For,Goals Against&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;s2&quot;&gt;&quot;Liverpool FC, 38, 32, 3, 3, 85, 33&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;s2&quot;&gt;&quot;Norwich City FC, 38, 5, 27, 6, 26, 75&quot;&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;nd&quot;&gt;@pytest&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;fixture&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;mock_csv_file&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;tmp_path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;mock_csv_data&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;datafile&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;tmp_path&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;football.csv&quot;&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;datafile&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;write_text&lt;/span&gt;&lt;span class=&quot;p&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;n&quot;&gt;mock_csv_data&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;str&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;datafile&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python-interview-problem-parsing-csv-files/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-interview-problem-parsing-csv-files/ »&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 #64: Detecting Deforestation With Python &amp; Using GraphQL With Django and Vue</title>
      <id>https://realpython.com/podcasts/rpp/64/</id>
      <link href="https://realpython.com/podcasts/rpp/64/"/>
      <updated>2021-06-11T12:00:00+00:00</updated>
      <summary>Are you looking for an in-depth data science project to practice your skills on? Perhaps you would like to add new tools to your Python web development projects instead? This week on the show, David Amos is back, and he&#x27;s brought another batch of PyCoder&#x27;s Weekly articles and projects.</summary>
      <content type="html">
        &lt;p&gt;Are you looking for an in-depth data science project to practice your skills on? Perhaps you would like to add new tools to your Python web development projects instead? This week on the show, David Amos is back, and he&#x27;s brought 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: Setting Up Python</title>
      <id>https://realpython.com/courses/setting-up-python/</id>
      <link href="https://realpython.com/courses/setting-up-python/"/>
      <updated>2021-06-08T14:00:00+00:00</updated>
      <summary>The first step to getting started with Python is to set it up on your machine. In this course, you&#x27;ll learn how to download Python for Windows, macOS, and Ubuntu Linux and how to open Python&#x27;s Integrated Development and Learning Environment, IDLE.</summary>
      <content type="html">
        &lt;p&gt;Setting up Python is the first step to becoming a Python programmer. In this course, you&amp;rsquo;ll learn how to download and install Python for Windows, macOS, and Ubuntu Linux and how to open &lt;strong&gt;Python&amp;rsquo;s Integrated Development and Learning Environment, IDLE&lt;/strong&gt;. &lt;/p&gt;
&lt;p&gt;There are many ways to install Python. You can download official Python distributions from &lt;a href=&quot;https://python.org&quot;&gt;Python.org&lt;/a&gt;, install from a package manager, and even install specialized distributions for scientific computing, Internet of Things, and embedded systems. This course focuses on official distributions, as they&amp;rsquo;re generally the best option for getting started with learning to program in Python.&lt;/p&gt;
&lt;p&gt;This course can be enjoyed alone or as an accompaniment to &lt;a href=&quot;http://pythonbasicsbook.com&quot;&gt;Python Basics: A Practical Introduction to Python 3&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this course, you&amp;rsquo;ll learn how to:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Install Python on &lt;strong&gt;Windows&lt;/strong&gt;, &lt;strong&gt;macOS&lt;/strong&gt;, and &lt;strong&gt;Linux&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Open &lt;strong&gt;IDLE&lt;/strong&gt;, Python&amp;rsquo;s integrated development and learning environment&lt;/li&gt;
&lt;/ul&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast – Episode #63: Create Web Applications Using Only Python With Anvil</title>
      <id>https://realpython.com/podcasts/rpp/63/</id>
      <link href="https://realpython.com/podcasts/rpp/63/"/>
      <updated>2021-06-04T12:00:00+00:00</updated>
      <summary>What if you could create an application and deploy it to the web with just Python? Wouldn&#x27;t it be nice to skip the additional full-stack development steps of learning three different languages in addition to Python? That&#x27;s the idea behind Anvil. This week on the show, we have Meredydd Luff, co-founder of Anvil.</summary>
      <content type="html">
        &lt;p&gt;What if you could create an application and deploy it to the web with just Python? Wouldn&#x27;t it be nice to skip the additional full-stack development steps of learning three different languages in addition to Python? That&#x27;s the idea behind Anvil. This week on the show, we have Meredydd Luff, co-founder of Anvil.&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>Explore Your Dataset With Pandas</title>
      <id>https://realpython.com/courses/explore-dataset-with-pandas/</id>
      <link href="https://realpython.com/courses/explore-dataset-with-pandas/"/>
      <updated>2021-06-01T14:00:00+00:00</updated>
      <summary>In this step-by-step course, you&#x27;ll learn how to start exploring a dataset with Pandas and Python. You&#x27;ll learn how to access specific rows and columns to answer questions about your data. You&#x27;ll also see how to handle missing values and prepare to visualize your dataset in a Jupyter Notebook.</summary>
      <content type="html">
        &lt;p&gt;Do you have a large dataset that&amp;rsquo;s full of interesting insights, but you&amp;rsquo;re not sure where to start exploring it? Has your boss asked you to generate some &lt;a href=&quot;https://realpython.com/python-statistics/&quot;&gt;statistics&lt;/a&gt; from it, but they&amp;rsquo;re not so easy to extract? These are precisely the use cases where &lt;strong&gt;Pandas&lt;/strong&gt; and Python can help you! With these tools, you&amp;rsquo;ll be able to slice a large dataset down into manageable parts and glean insight from that information.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this course, you&amp;rsquo;ll learn how to:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Calculate&lt;/strong&gt; metrics about your data&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Perform&lt;/strong&gt; basic queries and aggregations&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Discover&lt;/strong&gt; and handle incorrect data, inconsistencies, and missing values&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Visualize&lt;/strong&gt; your data with plots&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You&amp;rsquo;ll also learn about the differences between the main &lt;a href=&quot;https://realpython.com/python-data-structures/&quot;&gt;data structures&lt;/a&gt; that Pandas and Python use.&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 #62: Selecting the Ideal Data Structure &amp; Unravelling Python&#x27;s &quot;pass&quot; and &quot;with&quot;</title>
      <id>https://realpython.com/podcasts/rpp/62/</id>
      <link href="https://realpython.com/podcasts/rpp/62/"/>
      <updated>2021-05-28T12:00:00+00:00</updated>
      <summary>How do you know you&#x27;re using the correct data structure for your Python project? There are so many built into Python and even more that are importable from the collections module. This week on the show, David Amos is back, and he&#x27;s brought another batch of PyCoder&#x27;s Weekly articles and projects. We discuss a recent three-part video course on selecting the ideal data structure.</summary>
      <content type="html">
        &lt;p&gt;How do you know you&#x27;re using the correct data structure for your Python project? There are so many built into Python and even more that are importable from the collections module. This week on the show, David Amos is back, and he&#x27;s brought another batch of PyCoder&#x27;s Weekly articles and projects. We discuss a recent three-part video course on selecting the ideal data structure.&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 Set Up a Django Project</title>
      <id>https://realpython.com/courses/set-up-django-project/</id>
      <link href="https://realpython.com/courses/set-up-django-project/"/>
      <updated>2021-05-25T14:00:00+00:00</updated>
      <summary>In this course, you&#x27;ll learn the necessary steps you&#x27;ll need to take to set up a new Django project. You&#x27;ll learn the basic setup for any new Django project that needs to happen before programming the specific functionality of your project.</summary>
      <content type="html">
        &lt;p&gt;When you start building any new Django web application, there&amp;rsquo;s a basic setup you need to tackle first. This course outlines the &lt;strong&gt;necessary steps to set up a Django project&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;During this course, you&amp;rsquo;ll focus on the initial steps you&amp;rsquo;ll need to take to start a new web application. You should first have Python installed and you should know how to work with virtual environments and Python&amp;rsquo;s package manager, &lt;code&gt;pip&lt;/code&gt;. You won&amp;rsquo;t need much programming knowledge to follow along with this setup, though you&amp;rsquo;ll need to know some Python to develop your project further afterwards.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;After finishing this course, you&amp;rsquo;ll know how to:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Set up a &lt;strong&gt;virtual environment&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Install&lt;/strong&gt; Django&lt;/li&gt;
&lt;li&gt;Pin your &lt;strong&gt;project dependencies&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Set up a Django &lt;strong&gt;project&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Start a Django &lt;strong&gt;app&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast – Episode #61: Scaling Data Science and Machine Learning Infrastructure Like Netflix</title>
      <id>https://realpython.com/podcasts/rpp/61/</id>
      <link href="https://realpython.com/podcasts/rpp/61/"/>
      <updated>2021-05-21T12:00:00+00:00</updated>
      <summary>Would you move your data science project from a laptop to the cloud? Would you also like to have snapshots of your project saved along the way so that you can go back in time or share the state of your project with another team member? This week on the show, we have Savin Goyal from Netflix. Savin is the technical lead for machine learning infrastructure at Netflix. He joins us to talk about Metaflow, an open-source tool to simplify building, managing, and scaling data science projects.</summary>
      <content type="html">
        &lt;p&gt;Would you move your data science project from a laptop to the cloud? Would you also like to have snapshots of your project saved along the way so that you can go back in time or share the state of your project with another team member? This week on the show, we have Savin Goyal from Netflix. Savin is the technical lead for machine learning infrastructure at Netflix. He joins us to talk about Metaflow, an open-source tool to simplify building, managing, and scaling data science 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 Python or Operator</title>
      <id>https://realpython.com/courses/using-python-or-operator/</id>
      <link href="https://realpython.com/courses/using-python-or-operator/"/>
      <updated>2021-05-18T14:00:00+00:00</updated>
      <summary>In this step-by-step course, you&#x27;ll learn about how the Python or operator works and how to use it. You&#x27;ll get to know its special features and see what kind of programming problems you can solve by using or in Python.</summary>
      <content type="html">
        &lt;p&gt;There are three Boolean operators in Python: &lt;code&gt;and&lt;/code&gt;, &lt;code&gt;or&lt;/code&gt;, and &lt;code&gt;not&lt;/code&gt;. With them, you can test conditions and decide which execution path your programs will take. In this tutorial, you&amp;rsquo;ll take a deep dive into the Python &lt;code&gt;or&lt;/code&gt; operator and how to use it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;By the end of this course, you&amp;rsquo;ll have learned:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;How the Python &lt;code&gt;or&lt;/code&gt; operator works&lt;/li&gt;
&lt;li&gt;How to use the Python &lt;code&gt;or&lt;/code&gt; operator in Boolean and non-Boolean contexts&lt;/li&gt;
&lt;li&gt;What kind of programming problems you can solve by using &lt;code&gt;or&lt;/code&gt; in Python&lt;/li&gt;
&lt;li&gt;How to read and better understand other people&amp;rsquo;s code when they use some of the special features of the Python &lt;code&gt;or&lt;/code&gt; operator&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You&amp;rsquo;ll learn how to use the Python &lt;code&gt;or&lt;/code&gt; operator by building some practical examples. Even if you don&amp;rsquo;t really use all the possibilities that the Python &lt;code&gt;or&lt;/code&gt; operator offers, mastering it will allow you to write better code.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast – Episode #60: Building a Platform Game With Arcade and Covering Python News Monthly</title>
      <id>https://realpython.com/podcasts/rpp/60/</id>
      <link href="https://realpython.com/podcasts/rpp/60/"/>
      <updated>2021-05-14T12:00:00+00:00</updated>
      <summary>Did you know the Python Software Foundation is hiring! With the recent support of three Visionary Sponsors, the PSF has been able to open positions for a developer-in-residence and a Python packaging project manager. Real Python now has a monthly Python news article. Frequent guest of the show, David Amos compiles and summarizes the biggest Python news from the past month.</summary>
      <content type="html">
        &lt;p&gt;Did you know the Python Software Foundation is hiring! With the recent support of three Visionary Sponsors, the PSF has been able to open positions for a developer-in-residence and a Python packaging project manager. Real Python now has a monthly Python news article. Frequent guest of the show, David Amos compiles and summarizes the biggest Python news from the past month.&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>Stacks and Queues: Selecting the Ideal Data Structure</title>
      <id>https://realpython.com/courses/stacks-queues-ideal-data-structure/</id>
      <link href="https://realpython.com/courses/stacks-queues-ideal-data-structure/"/>
      <updated>2021-05-11T14:00:00+00:00</updated>
      <summary>In this course, you&#x27;ll learn about three of Python&#x27;s data structures: stacks, queue and priority queues. You&#x27;ll look at multiple types and classes for all of these and learn which implementations are best for your specific use cases.</summary>
      <content type="html">
        &lt;p&gt;There are a variety of ways for storing and managing data in your program and the choice of the right data structure has an effect on the readability of your code, ease of writing, and performance. Python has a wide selection of built-in mechanisms that meet most of your data structure needs. This course introduces you to three types of data structures: stacks, queues, and priority queues. &lt;/p&gt;
&lt;p&gt;There are multiple types and classes for all of these data structures and this course discusses them and provides information on how to choose the right one.&lt;/p&gt;
&lt;p&gt;In this course you&amp;rsquo;ll learn about:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;How stacks are defined with &lt;strong&gt;Last-In/First-Out (LIFO)&lt;/strong&gt; semantics&lt;/li&gt;
&lt;li&gt;How to use the &lt;strong&gt;collections.deque&lt;/strong&gt; object &lt;/li&gt;
&lt;li&gt;How &lt;strong&gt;concurrency&lt;/strong&gt; will affect your choice&lt;/li&gt;
&lt;li&gt;What are &lt;strong&gt;priority queues&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Which data structure methods are &lt;strong&gt;thread&lt;/strong&gt; safe&lt;/li&gt;
&lt;li&gt;How to &lt;strong&gt;decide&lt;/strong&gt; between all of implementations of these data structures&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The course is the &lt;strong&gt;third&lt;/strong&gt; part of an ongoing series, exploring how to find the right Data Structure for your projects. The &lt;strong&gt;first&lt;/strong&gt; course is &lt;a href=&quot;https://realpython.com/courses/dicts-arrays-ideal-data-structure/&quot;&gt;Dictionaries and Arrays: Selecting the Ideal Data Structure&lt;/a&gt; and the &lt;strong&gt;second&lt;/strong&gt; course is &lt;a href=&quot;https://realpython.com/courses/records-sets-ideal-data-structure/&quot;&gt;Records and Sets: Selecting the Ideal Data Structure&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>
  

</feed>
