<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

  <title>Real Python</title>
  <link href="https://realpython.com/atom.xml" rel="self"/>
  <link href="https://realpython.com/"/>
  <updated>2023-01-27T12:00:00+00:00</updated>
  <id>https://realpython.com/</id>
  <author>
    <name>Real Python</name>
  </author>

  
    <entry>
      <title>The Real Python Podcast – Episode #142: Orchestrating Large and Small Projects With Apache Airflow</title>
      <id>https://realpython.com/podcasts/rpp/142/</id>
      <link href="https://realpython.com/podcasts/rpp/142/"/>
      <updated>2023-01-27T12:00:00+00:00</updated>
      <summary>Have you worked on a project that needed an orchestration tool? How do you define the workflow of an entire data pipeline or a messaging system with Python? This week on the show, Calvin Hendryx-Parker is back to talk about using Apache Airflow and orchestrating Python projects.</summary>
      <content type="html">
        &lt;p&gt;Have you worked on a project that needed an orchestration tool? How do you define the workflow of an entire data pipeline or a messaging system with Python? This week on the show, Calvin Hendryx-Parker is back to talk about using Apache Airflow and orchestrating Python projects.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Python Standard REPL: Try Out Code and Ideas Quickly</title>
      <id>https://realpython.com/python-repl/</id>
      <link href="https://realpython.com/python-repl/"/>
      <updated>2023-01-25T14:00:00+00:00</updated>
      <summary>In this tutorial, you&#x27;ll learn how to use the Python standard REPL (Read-Eval-Print Loop) to run your code interactively. This tool will allow you to test new ideas, explore and experiment with new tools and libraries, refactor and debug your code, try out examples, and more.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;The Python standard shell, or &lt;strong&gt;REPL (Read-Eval-Print Loop)&lt;/strong&gt;, allows you to run Python code interactively while working on a project or learning the language. This tool is available in every Python installation, so you can use it at any moment.&lt;/p&gt;
&lt;p&gt;As a Python developer, you’ll spend a considerable part of your coding time in a REPL session because this tool allows you to test new ideas, explore and experiment with new tools and libraries, refactor and debug your code, and try out examples.&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;Run the Python &lt;strong&gt;standard REPL&lt;/strong&gt;, or interactive shell&lt;/li&gt;
&lt;li&gt;Write and execute &lt;strong&gt;Python code&lt;/strong&gt; in an interactive session&lt;/li&gt;
&lt;li&gt;Quickly &lt;strong&gt;edit&lt;/strong&gt;, &lt;strong&gt;modify&lt;/strong&gt;, and &lt;strong&gt;reuse&lt;/strong&gt; code in a REPL session&lt;/li&gt;
&lt;li&gt;Get &lt;strong&gt;help&lt;/strong&gt; and &lt;strong&gt;introspect&lt;/strong&gt; your code in an interactive session&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Tweak&lt;/strong&gt; some features of the standard REPL&lt;/li&gt;
&lt;li&gt;Identify the standard REPL’s &lt;strong&gt;missing features&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You’ll also learn about available feature-rich REPLs, such as &lt;a href=&quot;https://realpython.com/python-idle/&quot;&gt;IDLE&lt;/a&gt;, &lt;a href=&quot;https://ipython.readthedocs.io/en/stable/#ipython-documentation&quot;&gt;IPython&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/bpython-alternative-python-repl/&quot;&gt;bpython&lt;/a&gt;, and &lt;a href=&quot;https://github.com/jonathanslenders/ptpython/&quot;&gt;ptpython&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;To get the most out of this tutorial, you should be familiar with your operating system’s command line, or terminal. You should also know the basics of using the &lt;a href=&quot;https://realpython.com/python-command-line-arguments/&quot;&gt;&lt;code&gt;python&lt;/code&gt; command&lt;/a&gt; to run your code.&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown=&quot;1&quot;&gt;Free Sample Code:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/python-repl-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-python-repl-code&quot; data-focus=&quot;false&quot; markdown=&quot;1&quot;&gt;Click here to download the free sample code&lt;/a&gt; that you’ll use to explore the capabilities of Python’s standard REPL.&lt;/p&gt;
&lt;/div&gt;
&lt;h2 id=&quot;getting-to-know-the-python-standard-repl&quot;&gt;Getting to Know the Python Standard REPL&lt;a class=&quot;headerlink&quot; href=&quot;#getting-to-know-the-python-standard-repl&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;In computer programming, you’ll find two kinds of programming languages: &lt;strong&gt;compiled&lt;/strong&gt; and &lt;strong&gt;interpreted&lt;/strong&gt; languages. Compiled programming languages like &lt;a href=&quot;https://realpython.com/c-for-python-programmers/&quot;&gt;C&lt;/a&gt; and &lt;a href=&quot;https://realpython.com/python-vs-cpp/&quot;&gt;C++&lt;/a&gt; will have a &lt;a href=&quot;https://en.wikipedia.org/wiki/Compiler&quot;&gt;compiler&lt;/a&gt; program, which takes care of translating the language’s code into &lt;a href=&quot;https://en.wikipedia.org/wiki/Machine_code&quot;&gt;machine code&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This machine code is typically saved into an executable file. Once you have an executable file, you can run your program on any compatible computer system without needing the compiler or the source code.&lt;/p&gt;
&lt;p&gt;In contrast, interpreted languages like Python need an &lt;a href=&quot;https://en.wikipedia.org/wiki/Interpreter_(computing)&quot;&gt;interpreter&lt;/a&gt; program. This means that you need to have a Python interpreter installed to run Python code on your computer. Some may consider this characteristic a drawback because it can make your code distribution process much more difficult.&lt;/p&gt;
&lt;p&gt;However, in Python, having an interpreter offers one significant advantage that comes in handy during your development and testing process. The Python interpreter allows for what’s known as an interactive &lt;a href=&quot;https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop&quot;&gt;REPL (Read-Eval-Print Loop)&lt;/a&gt;, or shell, which reads a piece of code, evaluates it, and then prints the result to the console in a loop.&lt;/p&gt;
&lt;div class=&quot;alert alert-primary&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; In this tutorial, you’ll learn about the &lt;a href=&quot;https://realpython.com/cpython-source-code-guide/&quot;&gt;CPython&lt;/a&gt; standard REPL, which is available in all the installers of this Python distribution. If you don’t have CPython yet, then check out &lt;a href=&quot;https://realpython.com/installing-python/&quot;&gt;Python 3 Installation &amp;amp; Setup Guide&lt;/a&gt; for detailed instructions.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;The Python interpreter can execute Python code in two modes:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/run-python-scripts/&quot;&gt;Script&lt;/a&gt;, or program&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/interacting-with-python/&quot;&gt;Interactive&lt;/a&gt;, or REPL&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;In &lt;strong&gt;script mode&lt;/strong&gt;, you use the interpreter to run a source file as an executable program. In this case, Python loads the file content and runs the code line by line, following the script or program’s execution flow. Alternatively, &lt;strong&gt;interactive mode&lt;/strong&gt; is when you launch the interpreter and use it as a platform to run code that you type in directly.&lt;/p&gt;
&lt;div class=&quot;alert alert-primary&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The name Python is commonly used to denote two different things: the &lt;strong&gt;language&lt;/strong&gt; itself, and the &lt;strong&gt;interpreter&lt;/strong&gt;. In this tutorial, you’ll find the explicit term &lt;strong&gt;Python interpreter&lt;/strong&gt; only in situations where ambiguity can arise.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;In this tutorial, you’ll learn how to use the Python standard REPL to run code interactively, which allows you to try ideas and test concepts when using and learning Python. Are you ready to take a closer look at the Python REPL? Keep reading!&lt;/p&gt;
&lt;h3 id=&quot;what-is-pythons-interactive-shell-or-repl&quot;&gt;What Is Python’s Interactive Shell or REPL?&lt;a class=&quot;headerlink&quot; href=&quot;#what-is-pythons-interactive-shell-or-repl&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;When you run the Python interpreter in interactive mode, you open an &lt;strong&gt;interactive shell&lt;/strong&gt;, also known as an &lt;strong&gt;interactive&lt;/strong&gt; or a &lt;strong&gt;REPL&lt;/strong&gt; session. In this &lt;a href=&quot;https://en.wikipedia.org/wiki/Shell_(computing)&quot;&gt;shell&lt;/a&gt;, your keyboard is the input source, and your screen is the output destination.&lt;/p&gt;
&lt;div class=&quot;alert alert-primary&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; In this tutorial, you’ll find the terms &lt;strong&gt;interactive shell&lt;/strong&gt;, &lt;strong&gt;interactive session&lt;/strong&gt;, &lt;strong&gt;interpreter session&lt;/strong&gt;, and &lt;strong&gt;REPL session&lt;/strong&gt; used interchangeably.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;The input consists of Python code, which the interpreter parses and evaluates. After that’s done, the interpreter automatically displays the result on your screen, and the process starts again as a loop.&lt;/p&gt;
&lt;p&gt;So, Python’s REPL is an interactive way to talk to your computer using the Python language. It’s like live chat. The whole process is known as a REPL because it goes through four steps that run under the hood:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Reading&lt;/strong&gt; your input, which consists of Python code as &lt;a href=&quot;https://docs.python.org/3/glossary.html#term-expression&quot;&gt;expressions&lt;/a&gt; and &lt;a href=&quot;https://docs.python.org/3/glossary.html#term-statement&quot;&gt;statements&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Evaluating&lt;/strong&gt; your Python code, which generates a result or causes &lt;a href=&quot;https://en.wikipedia.org/wiki/Side_effect_(computer_science)&quot;&gt;side effects&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Printing&lt;/strong&gt; any output so that you can check your code’s results and get immediate feedback&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Looping&lt;/strong&gt; back to step one to continue the interaction&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This feature of Python is a powerful tool that you’ll wind up needing in your Python coding adventure, especially when you’re learning the language or when you’re in the early stages of a development process. That’s because the REPL offers several benefits, which you’ll learn about next.&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python-repl/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-repl/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Python Basics: Object-Oriented Programming</title>
      <id>https://realpython.com/courses/python-basics-oop/</id>
      <link href="https://realpython.com/courses/python-basics-oop/"/>
      <updated>2023-01-24T14:00:00+00:00</updated>
      <summary>In this video course, you&#x27;ll get to know OOP, or object-oriented programming. You&#x27;ll learn how to create a class, use classes to create new objects, and instantiate classes with attributes.</summary>
      <content type="html">
        &lt;p&gt;&lt;strong&gt;OOP&lt;/strong&gt;, or &lt;strong&gt;object-oriented programming&lt;/strong&gt;, is a method of structuring a program by bundling related properties and behaviors into individual objects. &lt;/p&gt;
&lt;p&gt;Conceptually, objects are like the components of a system. Think of a program as a factory assembly line of sorts. At each step of the assembly line, a system component processes some material, ultimately transforming raw material into a finished product.&lt;/p&gt;
&lt;p&gt;An object contains both data, like the raw or preprocessed materials at each step on an assembly line, and behavior, like the action that each assembly line component performs.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this video course, you&amp;rsquo;ll learn how to:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Create a &lt;strong&gt;&lt;code&gt;class&lt;/code&gt;&lt;/strong&gt;, which is like a blueprint for creating an object&lt;/li&gt;
&lt;li&gt;Use classes to create new &lt;strong&gt;objects&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Instantiate classes with &lt;strong&gt;attributes&lt;/strong&gt; and &lt;strong&gt;methods&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This video course is part of the Python Basics series, which accompanies &lt;a href=&quot;https://realpython.com/products/python-basics-book/&quot;&gt;&lt;em&gt;Python Basics: A Practical Introduction to Python 3&lt;/em&gt;&lt;/a&gt;. You can also check out the other &lt;a href=&quot;https://realpython.com/learning-paths/python-basics/&quot;&gt;Python Basics courses&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;Note that you&amp;rsquo;ll be using &lt;a href=&quot;https://realpython.com/python-idle/&quot;&gt;IDLE&lt;/a&gt; to &lt;a href=&quot;https://realpython.com/interacting-with-python/&quot;&gt;interact with Python&lt;/a&gt; throughout this course. If you&amp;rsquo;re just getting started, then you might want to check out &lt;a href=&quot;https://realpython.com/courses/setting-up-python/&quot;&gt;Python Basics: Setting Up Python&lt;/a&gt; before diving into this course.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Linear Algebra in Python: Matrix Inverses and Least Squares</title>
      <id>https://realpython.com/python-linear-algebra/</id>
      <link href="https://realpython.com/python-linear-algebra/"/>
      <updated>2023-01-23T14:00:00+00:00</updated>
      <summary>In this tutorial, you&#x27;ll work with linear algebra in Python. You&#x27;ll learn how to perform computations on matrices and vectors, how to study linear systems and solve them using matrix inverses, and how to perform linear regression to predict prices based on historical data.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;&lt;strong&gt;Linear algebra&lt;/strong&gt; is an important topic across a variety of subjects. It allows you to solve problems related to &lt;strong&gt;vectors&lt;/strong&gt;, &lt;strong&gt;matrices&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 models&lt;/strong&gt; play an important role in a variety of real-world problems, and &lt;code&gt;scipy.linalg&lt;/code&gt; provides tools to compute 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;Study linear systems using &lt;strong&gt;determinants&lt;/strong&gt; and solve problems using &lt;strong&gt;matrix inverses&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Interpolate polynomials&lt;/strong&gt; to fit a set of points using linear systems&lt;/li&gt;
&lt;li&gt;Use Python to &lt;strong&gt;solve linear regression problems&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Use linear regression to &lt;strong&gt;predict prices&lt;/strong&gt; based on historical data&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This is the second part of a series of tutorials on linear algebra using &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;. So, before continuing, make sure to take a look at the &lt;a href=&quot;https://realpython.com/python-scipy-linalg/&quot;&gt;first tutorial of the series&lt;/a&gt; before reading this one.&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown=&quot;1&quot;&gt;Free Source Code:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/python-linear-algebra-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-python-linear-algebra-code&quot; data-focus=&quot;false&quot; markdown=&quot;1&quot;&gt;Click here to download the free code and dataset&lt;/a&gt; that you’ll use to work with linear systems and algebra in Python with &lt;code&gt;scipy.linalg&lt;/code&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Now you’re ready to get started!&lt;/p&gt;
&lt;h2 id=&quot;getting-started-with-linear-algebra-in-python&quot;&gt;Getting Started With Linear Algebra in Python&lt;a class=&quot;headerlink&quot; href=&quot;#getting-started-with-linear-algebra-in-python&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Linear_algebra&quot;&gt;Linear algebra&lt;/a&gt; is a branch of mathematics that deals with 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 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;To work with linear algebra in Python, you can count on &lt;a href=&quot;https://scipy.org/&quot;&gt;SciPy&lt;/a&gt;, which is an open-source Python library used for scientific computing, including several modules for common tasks in science and engineering.&lt;/p&gt;
&lt;p&gt;Of course, SciPy includes modules for &lt;a href=&quot;https://docs.scipy.org/doc/scipy/reference/linalg.html&quot;&gt;linear algebra&lt;/a&gt;, but that’s not all. It also offers &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/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; capabilities. It’s part of the &lt;a href=&quot;https://projects.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;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 &lt;a href=&quot;https://en.wikipedia.org/wiki/Determinant&quot;&gt;determinants&lt;/a&gt;, &lt;a href=&quot;https://en.wikipedia.org/wiki/Invertible_matrix&quot;&gt;inverses&lt;/a&gt;, &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 the &lt;a href=&quot;https://realpython.com/python-scipy-linalg/&quot;&gt;previous tutorial of this series&lt;/a&gt;, you learned how to work with matrices and vectors in Python to model practical problems using linear systems. You solved these problems using &lt;code&gt;scipy.linalg&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;In this tutorial, you’re going a step further, using &lt;code&gt;scipy.linalg&lt;/code&gt; to study linear systems and build linear models for real-world problems.&lt;/p&gt;
&lt;p&gt;In order to use &lt;code&gt;scipy.linalg&lt;/code&gt;, you have to install and set up the SciPy library. Besides that, 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. SciPy and Jupyter Notebook are third-party packages that you need to install. For installation, you can use the &lt;a href=&quot;https://docs.conda.io/projects/conda/en/latest/user-guide/getting-started.html&quot;&gt;&lt;code&gt;conda&lt;/code&gt;&lt;/a&gt; or &lt;a href=&quot;https://realpython.com/what-is-pip/&quot;&gt;&lt;code&gt;pip&lt;/code&gt;&lt;/a&gt; package manager. Revisit &lt;a href=&quot;https://realpython.com/python-scipy-linalg/#getting-started-with-scipylinalg&quot;&gt;Working With Linear Systems in Python With &lt;code&gt;scipy.linalg&lt;/code&gt;&lt;/a&gt; for installation details.&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; Using &lt;a href=&quot;https://jupyter.org/&quot;&gt;Jupyter Notebook&lt;/a&gt; to run the code 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;Next, you’ll go through some fundamental concepts of linear algebra and explore how to use Python to work with these concepts.&lt;/p&gt;
&lt;h2 id=&quot;understanding-vectors-matrices-and-the-role-of-linear-algebra&quot;&gt;Understanding Vectors, Matrices, and the Role of Linear Algebra&lt;a class=&quot;headerlink&quot; href=&quot;#understanding-vectors-matrices-and-the-role-of-linear-algebra&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;A &lt;strong&gt;vector&lt;/strong&gt; is a mathematical entity used to represent physical quantities that have both magnitude and direction. It’s a fundamental tool for solving engineering and machine learning problems. So are &lt;strong&gt;matrices&lt;/strong&gt;, which are used to represent vector transformations, among other applications.&lt;/p&gt;
&lt;div class=&quot;alert alert-primary&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; In Python, &lt;a href=&quot;https://numpy.org/&quot;&gt;NumPy&lt;/a&gt; is the &lt;a href=&quot;https://www.jetbrains.com/lp/python-developers-survey-2020/#FrameworksLibraries&quot;&gt;most used library&lt;/a&gt; for working with matrices and vectors. It uses a special type called &lt;a href=&quot;https://realpython.com/numpy-array-programming/&quot;&gt;&lt;code&gt;ndarray&lt;/code&gt;&lt;/a&gt; to represent them. As an example, imagine that you need to create the following matrix:&lt;/p&gt;
&lt;figure class=&quot;&quot;&gt;&lt;img loading=&quot;lazy&quot; class=&quot;img-fluid mx-auto d-block &quot; src=&quot;https://files.realpython.com/media/scipy-linalg-matrix-np.b3b8be998727.png&quot; width=&quot;1350&quot; height=&quot;179&quot; srcset=&quot;https://robocrop.realpython.net/?url=https%3A//files.realpython.com/media/scipy-linalg-matrix-np.b3b8be998727.png&amp;amp;w=337&amp;amp;sig=2d39b11d2b83a627602ec4a9f597885a540c6729 337w, https://robocrop.realpython.net/?url=https%3A//files.realpython.com/media/scipy-linalg-matrix-np.b3b8be998727.png&amp;amp;w=675&amp;amp;sig=20ba51d8c2a545f797b3f4a1c6e57af24d302138 675w, https://files.realpython.com/media/scipy-linalg-matrix-np.b3b8be998727.png 1350w&quot; sizes=&quot;75vw&quot; alt=&quot;Matrix to represent using NumPy&quot; data-asset=&quot;3140&quot;&gt;&lt;/figure&gt;
&lt;p&gt;With NumPy, you can use &lt;code&gt;np.array()&lt;/code&gt;, to create it, providing a nested list containing the elements of each row of the matrix:&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;In [1]: &lt;/span&gt;&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;numpy&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;np&lt;/span&gt;

&lt;span class=&quot;gp&quot;&gt;In [2]: &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;np&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;array&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;([[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;6&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]])&lt;/span&gt;
&lt;span class=&quot;gh&quot;&gt;Out[2]:&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;array([[1, 2],&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;       [3, 4],&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;       [5, 6]])&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;NumPy provides several functions to facilitate working with vector and matrix computations. You can find more information on how to use NumPy to represent vectors and matrices and perform operations with them in the &lt;a href=&quot;https://realpython.com/python-scipy-linalg/#working-with-vectors-and-matrices-using-numpy&quot;&gt;previous tutorial in this series&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;A &lt;strong&gt;linear system&lt;/strong&gt; or, more precisely, a system of linear equations, is a set of equations linearly relating to a set of variables. Here’s an example of a linear system relating to the variables &lt;em&gt;x&lt;/em&gt;₁ and &lt;em&gt;x&lt;/em&gt;₂:&lt;/p&gt;
&lt;figure class=&quot;&quot;&gt;&lt;img loading=&quot;lazy&quot; class=&quot;img-fluid mx-auto d-block w-100&quot; src=&quot;https://files.realpython.com/media/scipy-linalg-lin-syst-ex2.dd5d107931c0.png&quot; width=&quot;1350&quot; height=&quot;119&quot; srcset=&quot;https://robocrop.realpython.net/?url=https%3A//files.realpython.com/media/scipy-linalg-lin-syst-ex2.dd5d107931c0.png&amp;amp;w=337&amp;amp;sig=5f8375bf226a7118a6544461692a7ce3417f5b8e 337w, https://robocrop.realpython.net/?url=https%3A//files.realpython.com/media/scipy-linalg-lin-syst-ex2.dd5d107931c0.png&amp;amp;w=675&amp;amp;sig=0cad22c2a76c326731dec61f739367d73ab56769 675w, https://files.realpython.com/media/scipy-linalg-lin-syst-ex2.dd5d107931c0.png 1350w&quot; sizes=&quot;75vw&quot; alt=&quot;Linear system&quot; data-asset=&quot;3136&quot;&gt;&lt;/figure&gt;

&lt;p&gt;Here you have two equations involving two variables. In order to have a &lt;strong&gt;linear&lt;/strong&gt; system, the values that multiply the variables &lt;em&gt;x&lt;/em&gt;₁ and &lt;em&gt;x&lt;/em&gt;₂ must be constants, like the ones in this example. It’s common to write linear systems using matrices and vectors. For example, you can write the previous system as the following &lt;strong&gt;matrix product&lt;/strong&gt;:&lt;/p&gt;
&lt;figure class=&quot;&quot;&gt;&lt;img loading=&quot;lazy&quot; class=&quot;img-fluid mx-auto d-block w-100&quot; src=&quot;https://files.realpython.com/media/scipy-linalg-lin-syst-ex2-m.20ff7a7844d5.png&quot; width=&quot;1350&quot; height=&quot;191&quot; srcset=&quot;https://robocrop.realpython.net/?url=https%3A//files.realpython.com/media/scipy-linalg-lin-syst-ex2-m.20ff7a7844d5.png&amp;amp;w=337&amp;amp;sig=986c17564efc933a74ab716ca5dfa6c5fe7e3855 337w, https://robocrop.realpython.net/?url=https%3A//files.realpython.com/media/scipy-linalg-lin-syst-ex2-m.20ff7a7844d5.png&amp;amp;w=675&amp;amp;sig=44f6b3a1c41de7f2a414661c7f9d85e1eb7abf82 675w, https://files.realpython.com/media/scipy-linalg-lin-syst-ex2-m.20ff7a7844d5.png 1350w&quot; sizes=&quot;75vw&quot; alt=&quot;Linear system expressed using matrices and vectors&quot; data-asset=&quot;3137&quot;&gt;&lt;/figure&gt;

&lt;p&gt;Comparing the matrix product form with the original system, you can notice the elements of matrix &lt;strong&gt;A&lt;/strong&gt; correspond to the coefficients that multiply &lt;em&gt;x&lt;/em&gt;₁ and &lt;em&gt;x&lt;/em&gt;₂. Besides that, the values in the right-hand side of the original equations now make up vector &lt;strong&gt;b&lt;/strong&gt;.&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python-linear-algebra/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-linear-algebra/ »&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 #141: Exploring Python With bpython &amp; Formalizing f-String Grammar</title>
      <id>https://realpython.com/podcasts/rpp/141/</id>
      <link href="https://realpython.com/podcasts/rpp/141/"/>
      <updated>2023-01-20T12:00:00+00:00</updated>
      <summary>Have you used the Python Read-Eval-Print Loop (REPL) to explore the language and learn about how it operates? Would it help if it provided syntax highlighting, definitions, and code completion and behaved more like an IDE? This week on the show, Christopher Trudeau is here, bringing another batch of PyCoder&#x27;s Weekly articles and projects.</summary>
      <content type="html">
        &lt;p&gt;Have you used the Python Read-Eval-Print Loop (REPL) to explore the language and learn about how it operates? Would it help if it provided syntax highlighting, definitions, and code completion and behaved more like an IDE? This week on the show, Christopher Trudeau is here, bringing another batch of PyCoder&#x27;s Weekly articles and projects.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>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>2023-01-18T14: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;&lt;strong&gt;Solve linear systems&lt;/strong&gt; using &lt;code&gt;scipy.linalg&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Once you’ve gotten to know linear systems, you’ll be ready to explore matrices and least squares in the &lt;a href=&quot;https://realpython.com/python-linear-algebra/&quot;&gt;next tutorial&lt;/a&gt; in the series. For now, read on to get started with &lt;code&gt;scipy.linalg&lt;/code&gt;.&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown=&quot;1&quot;&gt;Free Source Code:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/python-linear-algebra-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-python-linear-algebra-code&quot; data-focus=&quot;false&quot; markdown=&quot;1&quot;&gt;Click here to download the free code and dataset&lt;/a&gt; that you’ll use to work with linear systems and algebra in Python with &lt;code&gt;scipy.linalg&lt;/code&gt;.&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://scipy.org/&quot;&gt;SciPy&lt;/a&gt; is 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/tutorial/integrate.html&quot;&gt;integration&lt;/a&gt;, &lt;a href=&quot;https://docs.scipy.org/doc/scipy/tutorial/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://projects.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 deals with 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 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 &lt;a href=&quot;https://en.wikipedia.org/wiki/Determinant&quot;&gt;determinants&lt;/a&gt;, &lt;a href=&quot;https://en.wikipedia.org/wiki/Invertible_matrix&quot;&gt;inverses&lt;/a&gt;, &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;&lt;code&gt;conda&lt;/code&gt;&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 &lt;code&gt;conda&lt;/code&gt;, 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 &lt;code&gt;conda&lt;/code&gt; 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 &lt;code&gt;conda&lt;/code&gt; 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 using SciPy, you’re also 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 tutorial 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_card769efb&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;#collapse769efb&quot; aria-expanded=&quot;false&quot; aria-controls=&quot;collapse769efb&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_card769efb&quot; id=&quot;collapse769efb&quot;&gt;
&lt;div class=&quot;card-body&quot;&gt;
&lt;p&gt;First, you should 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 and activate a virtual environment named &lt;code&gt;linalg&lt;/code&gt;:&lt;/p&gt;
&lt;ul class=&quot;nav nav-tabs justify-content-end js-platform-widget-tabs&quot; role=&quot;tablist&quot;&gt;
&lt;li class=&quot;nav-item mb-0 js-platform-widget-tab-windows&quot; role=&quot;presentation&quot;&gt;
    &lt;a class=&quot;nav-link link-unstyled text-body active small&quot; id=&quot;windows-tab-1&quot; data-toggle=&quot;tab&quot; href=&quot;#windows-1&quot; role=&quot;tab&quot; aria-controls=&quot;windows-1&quot; aria-selected=&quot;true&quot;&gt;&lt;i class=&quot;fa fa-windows text-muted mr-1&quot; aria-hidden=&quot;true&quot;&gt;&lt;/i&gt;Windows&lt;/a&gt;
  &lt;/li&gt;
&lt;li class=&quot;nav-item mb-0 js-platform-widget-tab-linuxmacos&quot; role=&quot;presentation&quot;&gt;
    &lt;a class=&quot;nav-link link-unstyled text-body small&quot; id=&quot;macos-tab-1&quot; data-toggle=&quot;tab&quot; href=&quot;#linux-macos-1&quot; role=&quot;tab&quot; aria-controls=&quot;linux-macos-1&quot; aria-selected=&quot;false&quot;&gt;&lt;i class=&quot;fa fa-linux text-muted mr-1&quot; aria-hidden=&quot;true&quot;&gt;&lt;/i&gt;&lt;i class=&quot;fa fa-apple text-muted mr-1&quot; aria-hidden=&quot;true&quot;&gt;&lt;/i&gt;Linux + macOS&lt;/a&gt;
  &lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;tab-content mt-2 mb-0 js-platform-widget-content&quot;&gt;
&lt;div aria-labelledby=&quot;windows-tab-1&quot; class=&quot;tab-pane fade show active&quot; id=&quot;windows-1&quot; role=&quot;tabpanel&quot;&gt;
&lt;div class=&quot;highlight pscon&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;PS&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;python&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;-m&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;venv&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;linalg&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;PS&amp;gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.\&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;linalg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;\&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Scripts&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;\&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Activate&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div aria-labelledby=&quot;linux-macos-tab-1&quot; class=&quot;tab-pane fade &quot; id=&quot;linux-macos-1&quot; role=&quot;tabpanel&quot;&gt;
&lt;div class=&quot;highlight sh&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;python -m venv linalg
&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;/div&gt;
&lt;/div&gt;
&lt;p&gt;After you activate the virtual 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 use &lt;code&gt;scipy.linalg&lt;/code&gt; and Jupyter.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Before opening Jupyter Notebook, you need to register the &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>Python Basics Exercises: File System Operations</title>
      <id>https://realpython.com/courses/python-file-system-exercises/</id>
      <link href="https://realpython.com/courses/python-file-system-exercises/"/>
      <updated>2023-01-17T14:00:00+00:00</updated>
      <summary>In this Python Basics Exercises course, you&#x27;ll review how to use Python to work with your computer&#x27;s file system. Then, you&#x27;ll tackle a coding challenge to further develop your skills.</summary>
      <content type="html">
        &lt;p&gt;In &lt;a href=&quot;https://realpython.com/courses/python-basics-file-system-operations/&quot;&gt;Python Basics: File System Operations&lt;/a&gt;, you learned how to use Python to work with files and folders. As a programmer, you&amp;rsquo;ll use the &lt;strong&gt;&lt;code&gt;pathlib&lt;/code&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;code&gt;shutil&lt;/code&gt;&lt;/strong&gt; modules to complete &lt;strong&gt;file system operations&lt;/strong&gt; without relying on your &lt;strong&gt;graphical user interface (GUI)&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;While you already got lots of hands-on practice with file system operations, programmers never stop training! The more you use your new skills, the more comfortable you&amp;rsquo;ll be when it&amp;rsquo;s time to put them to work in your own coding. That&amp;rsquo;s why it&amp;rsquo;s a great idea to complete exercises to reinforce and test your knowledge of the file system.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this video course, you&amp;rsquo;ll practice:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Creating&lt;/strong&gt; a directory&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Iterating&lt;/strong&gt; over the contents of a directory&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Searching&lt;/strong&gt; for files using wildcards&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Moving&lt;/strong&gt; and &lt;strong&gt;deleting&lt;/strong&gt; files and folders&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Along the way, you&amp;rsquo;ll also get some insight into how to tackle coding challenges in general, which can be a great way to level up as a developer.&lt;/p&gt;
&lt;p&gt;This video course is part of the Python Basics series, which accompanies &lt;a href=&quot;https://realpython.com/products/python-basics-book/&quot;&gt;&lt;em&gt;Python Basics: A Practical Introduction to Python 3&lt;/em&gt;&lt;/a&gt;. You can also check out the other &lt;a href=&quot;https://realpython.com/learning-paths/python-basics/&quot;&gt;Python Basics courses&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;Note that you&amp;rsquo;ll be using &lt;a href=&quot;https://realpython.com/python-idle/&quot;&gt;IDLE&lt;/a&gt; to &lt;a href=&quot;https://realpython.com/interacting-with-python/&quot;&gt;interact with Python&lt;/a&gt; throughout this course. If you&amp;rsquo;re just getting started, then you might want to check out &lt;a href=&quot;https://realpython.com/courses/setting-up-python/&quot;&gt;Python Basics: Setting Up Python&lt;/a&gt; before diving into this course.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Python&#x27;s Assignment Operator: Write Robust Assignments</title>
      <id>https://realpython.com/python-assignment-operator/</id>
      <link href="https://realpython.com/python-assignment-operator/"/>
      <updated>2023-01-16T14:00:00+00:00</updated>
      <summary>In this tutorial, you&#x27;ll learn how to use Python&#x27;s assignment operators to write assignment statements that allow you to create, initialize, and update variables in your code.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Python’s assignment operators allow you to define &lt;strong&gt;assignment statements&lt;/strong&gt;. This type of statement lets you create, initialize, and update variables throughout your code. Variables are a fundamental cornerstone in every piece of code, and assignment statements give you complete control over variable creation and mutation.&lt;/p&gt;
&lt;p&gt;Learning about the Python assignment operator and its use for writing assignment statements will arm you with powerful tools for writing better and more robust Python code.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this tutorial, you’ll:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Use Python’s &lt;strong&gt;assignment operator&lt;/strong&gt; to write &lt;strong&gt;assignment statements&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Take advantage of &lt;strong&gt;augmented assignments&lt;/strong&gt; in Python&lt;/li&gt;
&lt;li&gt;Explore assignment variants, like &lt;strong&gt;assignment expressions&lt;/strong&gt; and &lt;strong&gt;managed attributes&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Become aware of &lt;strong&gt;illegal&lt;/strong&gt; and &lt;strong&gt;dangerous&lt;/strong&gt; assignments in Python&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You’ll dive deep into Python’s assignment statements. To get the most out of this tutorial, you should be comfortable with several basic topics, including &lt;a href=&quot;https://realpython.com/python-variables/&quot;&gt;variables&lt;/a&gt;, built-in &lt;a href=&quot;https://realpython.com/python-data-types/&quot;&gt;data types&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/list-comprehension-python/&quot;&gt;comprehensions&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/defining-your-own-python-function/&quot;&gt;functions&lt;/a&gt;, and Python &lt;a href=&quot;https://realpython.com/python-keywords/&quot;&gt;keywords&lt;/a&gt;. Before diving into some of the later sections, you should also be familiar with intermediate topics, such as &lt;a href=&quot;https://realpython.com/python3-object-oriented-programming/&quot;&gt;object-oriented programming&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python-constants/&quot;&gt;constants&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python-import/&quot;&gt;imports&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python-type-checking/&quot;&gt;type hints&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python-property/&quot;&gt;properties&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python-descriptors/&quot;&gt;descriptors&lt;/a&gt;, and &lt;a href=&quot;https://realpython.com/primer-on-python-decorators/&quot;&gt;decorators&lt;/a&gt;.&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown=&quot;1&quot;&gt;Free Source Code:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/python-assignment-operator-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-python-assignment-operator-code&quot; data-focus=&quot;false&quot; markdown=&quot;1&quot;&gt;Click here to download the free assignment operator source code&lt;/a&gt; that you’ll use to write assignment statements that allow you to create, initialize, and update variables in your code.&lt;/p&gt;
&lt;/div&gt;
&lt;h2 id=&quot;assignment-statements-and-the-assignment-operator&quot;&gt;Assignment Statements and the Assignment Operator&lt;a class=&quot;headerlink&quot; href=&quot;#assignment-statements-and-the-assignment-operator&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;One of the most powerful programming language features is the ability to create, access, and mutate &lt;a href=&quot;https://realpython.com/python-variables/&quot;&gt;variables&lt;/a&gt;. In Python, a variable is a name that refers to a concrete value or object, allowing you to reuse that value or object throughout your code.&lt;/p&gt;
&lt;h3 id=&quot;the-assignment-statement-syntax&quot;&gt;The Assignment Statement Syntax&lt;a class=&quot;headerlink&quot; href=&quot;#the-assignment-statement-syntax&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;To create a new variable or to update the value of an existing one in Python, you’ll use an &lt;strong&gt;assignment statement&lt;/strong&gt;. This statement has the following three components:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;A left operand, which must be a &lt;strong&gt;variable&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;assignment operator&lt;/strong&gt; (&lt;code&gt;=&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;A right operand, which can be a &lt;strong&gt;concrete value&lt;/strong&gt;, an &lt;strong&gt;object&lt;/strong&gt;, or an &lt;strong&gt;expression&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Here’s how an assignment statement will generally look in Python:&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;n&quot;&gt;variable&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;expression&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Here, &lt;code&gt;variable&lt;/code&gt; represents a generic Python variable, while &lt;code&gt;expression&lt;/code&gt; represents any Python object that you can provide as a concrete value—also known as a &lt;strong&gt;literal&lt;/strong&gt;—or an expression that evaluates to a value.&lt;/p&gt;
&lt;p&gt;To execute an assignment statement like the above, Python runs the following steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Evaluate the right-hand &lt;strong&gt;expression&lt;/strong&gt; to produce a &lt;strong&gt;concrete value or object&lt;/strong&gt;. This value will live at a specific memory address in your computer.&lt;/li&gt;
&lt;li&gt;Store the object’s &lt;strong&gt;memory address&lt;/strong&gt; in the left-hand &lt;strong&gt;variable&lt;/strong&gt;. This step creates a new variable if the current one doesn’t already exist or updates the value of an existing variable.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The second step shows that variables work differently in Python than in other programming languages. In Python, variables aren’t containers for objects. Python variables point to a value or object through its memory address. They &lt;em&gt;store memory addresses&lt;/em&gt; rather than objects.&lt;/p&gt;
&lt;p&gt;This behavior difference directly impacts how data moves around in Python, which is always &lt;a href=&quot;https://realpython.com/python-pass-by-reference/#defining-pass-by-reference&quot;&gt;by reference&lt;/a&gt;. In most cases, this difference is irrelevant in your day-to-day coding, but it’s still good to know.&lt;/p&gt;
&lt;h3 id=&quot;the-assignment-operator&quot;&gt;The Assignment Operator&lt;a class=&quot;headerlink&quot; href=&quot;#the-assignment-operator&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The central component of an assignment statement is the &lt;strong&gt;assignment operator&lt;/strong&gt;. This operator is represented by the &lt;code&gt;=&lt;/code&gt; symbol, which separates two operands: &lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;A variable &lt;/li&gt;
&lt;li&gt;A value or an expression that evaluates to a concrete value&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;a href=&quot;https://realpython.com/python-operators-expressions/&quot;&gt;Operators&lt;/a&gt; are special symbols that perform &lt;a href=&quot;https://realpython.com/python-operators-expressions/#arithmetic-operators&quot;&gt;mathematical&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python-operators-expressions/#logical-operators&quot;&gt;logical&lt;/a&gt;, and &lt;a href=&quot;https://realpython.com/python-operators-expressions/#bitwise-operators&quot;&gt;bitwise&lt;/a&gt; operations in a programming language. The objects (or object) on which an operator operates are called &lt;strong&gt;operands&lt;/strong&gt;. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Unary&lt;/strong&gt; operators, like the &lt;a href=&quot;https://realpython.com/python-not-operator/&quot;&gt;&lt;code&gt;not&lt;/code&gt;&lt;/a&gt; Boolean operator, operate on a single object or operand, while &lt;strong&gt;binary&lt;/strong&gt; operators act on two. That means the assignment operator is a binary operator.&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; Like &lt;a href=&quot;https://realpython.com/c-for-python-programmers/&quot;&gt;C&lt;/a&gt;, Python uses &lt;code&gt;==&lt;/code&gt; for equality comparisons and &lt;code&gt;=&lt;/code&gt; for assignments. Unlike C, Python doesn’t allow you to accidentally use the assignment operator (&lt;code&gt;=&lt;/code&gt;) in an equality comparison.&lt;/p&gt;
&lt;p&gt;Equality is a symmetrical relationship, and assignment is not. For example, the expression &lt;code&gt;a == 42&lt;/code&gt; is equivalent to &lt;code&gt;42 == a&lt;/code&gt;. In contrast, the statement &lt;code&gt;a = 42&lt;/code&gt; is correct and legal, while &lt;code&gt;42 = a&lt;/code&gt; isn’t allowed. You’ll learn more about &lt;a href=&quot;#illegal-and-dangerous-assignments-in-python&quot;&gt;illegal assignments&lt;/a&gt; later on.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;The right-hand operand in an assignment statement can be any Python object, such as a &lt;a href=&quot;https://realpython.com/python-numbers/&quot;&gt;number&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python-lists-tuples/&quot;&gt;list&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python-strings/&quot;&gt;string&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python-dicts/&quot;&gt;dictionary&lt;/a&gt;, or even a user-defined object. It can also be an expression. In the end, expressions always evaluate to concrete objects, which is their return value.&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python-assignment-operator/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-assignment-operator/ »&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 #140: Speeding Up Your DataFrames With Polars</title>
      <id>https://realpython.com/podcasts/rpp/140/</id>
      <link href="https://realpython.com/podcasts/rpp/140/"/>
      <updated>2023-01-13T12:00:00+00:00</updated>
      <summary>How can you get more performance from your existing data science infrastructure? What if a DataFrame library could take advantage of your machine&#x27;s available cores and provide built-in methods for handling larger-than-RAM datasets? This week on the show, Liam Brannigan is here to discuss Polars.</summary>
      <content type="html">
        &lt;p&gt;How can you get more performance from your existing data science infrastructure? What if a DataFrame library could take advantage of your machine&#x27;s available cores and provide built-in methods for handling larger-than-RAM datasets? This week on the show, Liam Brannigan is here to discuss Polars.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Python Folium: Create Web Maps From Your Data</title>
      <id>https://realpython.com/python-folium-web-maps-from-data/</id>
      <link href="https://realpython.com/python-folium-web-maps-from-data/"/>
      <updated>2023-01-11T14:00:00+00:00</updated>
      <summary>You&#x27;ll learn how to create web maps from data using folium. The package combines Python&#x27;s data wrangling strengths with the data visualization power of the JavaScript library Leaflet. In this tutorial, you&#x27;ll create and style a choropleth world map that shows the ecological footprint per country.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;If you’re working with geospatial data in Python, then you might want to quickly visualize that data on a map. Python’s Folium library gives you access to the mapping strengths of the &lt;a href=&quot;https://leafletjs.com/&quot;&gt;Leaflet&lt;/a&gt; JavaScript library through a Python API. It allows you to create interactive geographic visualizations that you can &lt;a href=&quot;https://realpython.github.io/ecological-footprint/&quot;&gt;share as a website&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You’ll build the web map shown below, which displays the &lt;a href=&quot;https://en.wikipedia.org/wiki/Ecological_footprint&quot;&gt;ecological footprint&lt;/a&gt; per capita of many countries and is based on a &lt;a href=&quot;https://en.wikipedia.org/wiki/List_of_countries_by_ecological_footprint#/media/File:Ecological_footprint_2018.png&quot;&gt;similar map on Wikipedia&lt;/a&gt;. Along the way, you’ll learn the basics of using Folium for data visualization.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this tutorial, you’ll:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Create an &lt;strong&gt;interactive map&lt;/strong&gt; using Folium and save it as an &lt;strong&gt;HTML&lt;/strong&gt; file&lt;/li&gt;
&lt;li&gt;Choose from different &lt;strong&gt;web map tiles&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Anchor your map to a &lt;strong&gt;specific geolocation&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Bind data&lt;/strong&gt; to a &lt;strong&gt;GeoJSON&lt;/strong&gt; layer to create a &lt;strong&gt;choropleth map&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Style&lt;/strong&gt; the choropleth map&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you work through the tutorial, then your interactive map will look like this in the end:&lt;/p&gt;
&lt;figure&gt;
  &lt;div class=&quot;embed-responsive embed-responsive-16by9 rounded mb-3 &quot;&gt;
    &lt;iframe loading=&quot;lazy&quot; class=&quot;embed-responsive-item&quot; src=&quot;https://player.vimeo.com/video/781482855?background=1&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;
  &lt;/div&gt;
  &lt;figcaption class=&quot;figure-caption text-center&quot;&gt;Countries by raw ecological footprint per capita&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;In this tutorial, you’ll create HTML files that you can serve online at a static web hosting service. &lt;/p&gt;
&lt;p&gt;An alternative workflow is to use Folium inside of a &lt;a href=&quot;https://realpython.com/jupyter-notebook-introduction/&quot;&gt;Jupyter notebook&lt;/a&gt;. In that case, the Folium library will render your maps directly in the Jupyter notebook, which gives you a good opportunity to visually explore a geographical dataset or include a map in your data science report.&lt;/p&gt;
&lt;p&gt;If you click below to download the associated materials to this tutorial, then you’ll also get a Jupyter notebook set up with the code of this tutorial. Run the notebook to see how well Folium and Jupyter can play together:&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown=&quot;1&quot;&gt;Free Source Code:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/python-folium-web-maps-from-data-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-python-folium-web-maps-from-data-code&quot; data-focus=&quot;false&quot; markdown=&quot;1&quot;&gt;Click here to download the free source code&lt;/a&gt; for building web maps in Python with Folium.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;alert alert-primary&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong&gt;&lt;i class=&quot;fa fa-graduation-cap&quot; aria-hidden=&quot;true&quot;&gt;&lt;/i&gt; Take the Quiz:&lt;/strong&gt; Test your knowledge with our interactive “Python Folium: Create Web Maps From Your Data” quiz. Upon completion you will receive a score so you can track your learning progress over time:&lt;/p&gt;&lt;p class=&quot;text-center my-2&quot;&gt;&lt;a class=&quot;btn btn-primary&quot; href=&quot;/quizzes/python-folium/&quot; target=&quot;_blank&quot;&gt;Take the Quiz »&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;

&lt;h2 id=&quot;install-folium&quot;&gt;Install Folium&lt;a class=&quot;headerlink&quot; href=&quot;#install-folium&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;To get started, create and activate a virtual environment and install &lt;code&gt;folium&lt;/code&gt; and &lt;code&gt;pandas&lt;/code&gt;. You can use the platform switcher below to see the relevant commands for your operating system:&lt;/p&gt;
&lt;ul class=&quot;nav nav-tabs justify-content-end js-platform-widget-tabs&quot; role=&quot;tablist&quot;&gt;

  &lt;li class=&quot;nav-item mb-0 js-platform-widget-tab-windows&quot; role=&quot;presentation&quot;&gt;
    &lt;a class=&quot;nav-link link-unstyled text-body active small&quot; id=&quot;windows-tab-1&quot; data-toggle=&quot;tab&quot; href=&quot;#windows-1&quot; role=&quot;tab&quot; aria-controls=&quot;windows-1&quot; aria-selected=&quot;true&quot;&gt;&lt;i class=&quot;fa fa-windows text-muted mr-1&quot; aria-hidden=&quot;true&quot;&gt;&lt;/i&gt;Windows&lt;/a&gt;
  &lt;/li&gt;




  &lt;li class=&quot;nav-item mb-0 js-platform-widget-tab-linuxmacos&quot; role=&quot;presentation&quot;&gt;
    &lt;a class=&quot;nav-link link-unstyled text-body small&quot; id=&quot;macos-tab-1&quot; data-toggle=&quot;tab&quot; href=&quot;#linux-macos-1&quot; role=&quot;tab&quot; aria-controls=&quot;linux-macos-1&quot; aria-selected=&quot;false&quot;&gt;&lt;i class=&quot;fa fa-linux text-muted mr-1&quot; aria-hidden=&quot;true&quot;&gt;&lt;/i&gt;&lt;i class=&quot;fa fa-apple text-muted mr-1&quot; aria-hidden=&quot;true&quot;&gt;&lt;/i&gt;Linux + macOS&lt;/a&gt;
  &lt;/li&gt;

&lt;/ul&gt;
&lt;div class=&quot;tab-content mt-2 mb-0 js-platform-widget-content&quot;&gt;
&lt;div aria-labelledby=&quot;windows-tab-1&quot; class=&quot;tab-pane fade show active&quot; id=&quot;windows-1&quot; role=&quot;tabpanel&quot;&gt;
&lt;div class=&quot;highlight pscon&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;PS&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;python&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;-m&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;venv&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;venv&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;PS&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;venv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;\&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Scripts&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;\&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;activate&lt;/span&gt;
&lt;span class=&quot;gp gp-VirtualEnv&quot;&gt;(venv)&lt;/span&gt; &lt;span class=&quot;gp&quot;&gt;PS&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;python&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;-m&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pip&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;install&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;folium&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pandas&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div aria-labelledby=&quot;linux-macos-tab-1&quot; class=&quot;tab-pane fade &quot; id=&quot;linux-macos-1&quot; role=&quot;tabpanel&quot;&gt;
&lt;div class=&quot;highlight sh&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;python -m venv venv
&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;source&lt;/span&gt; venv/bin/activate
&lt;span class=&quot;gp gp-VirtualEnv&quot;&gt;(venv)&lt;/span&gt; &lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;python -m pip install folium pandas
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;You can use many features of Folium without &lt;a href=&quot;https://realpython.com/learning-paths/pandas-data-science/&quot;&gt;pandas&lt;/a&gt;. However, in this tutorial you’ll eventually create a choropleth map using &lt;a href=&quot;https://python-visualization.github.io/folium/modules.html#folium.features.Choropleth&quot;&gt;&lt;code&gt;folium.Choropleth&lt;/code&gt;&lt;/a&gt;, which takes a &lt;a href=&quot;https://realpython.com/pandas-dataframe/&quot;&gt;pandas &lt;code&gt;DataFrame&lt;/code&gt;&lt;/a&gt; or &lt;code&gt;Series&lt;/code&gt; object as one of its inputs.&lt;/p&gt;
&lt;h2 id=&quot;create-and-style-a-map&quot;&gt;Create and Style a Map&lt;a class=&quot;headerlink&quot; href=&quot;#create-and-style-a-map&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;A useful and beginner-friendly feature of Folium is that you can create a map with only three lines of code. The map looks good by default because the underlying Leaflet JavaScript library works well with a number of different tile providers, which provide high-quality map backgrounds for your web maps.&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; A &lt;strong&gt;tile&lt;/strong&gt; for a web map is an image or vector data file that represents a specific geographical area. &lt;a href=&quot;https://en.wikipedia.org/wiki/Tiled_web_map&quot;&gt;Tiled web maps&lt;/a&gt; seamlessly join multiple tiles to present a geographical area that’s larger than a single tile.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Additionally, the library boasts attractive default styles for map features and gives you many options to customize the map to fit your needs exactly.&lt;/p&gt;
&lt;h3 id=&quot;display-your-web-map-tilesin-style&quot;&gt;Display Your Web Map Tiles—in Style!&lt;a class=&quot;headerlink&quot; href=&quot;#display-your-web-map-tilesin-style&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;You want to show data on a world map, so you don’t even need to worry about providing any specific geolocation yet. Open up a new Python file in your favorite text editor and create a tiled web map with three lines of code:&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;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;folium&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;m&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;folium&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Map&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;m&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;save&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;footprint.html&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;When you run your script, Python creates a new HTML file in your working directory that displays an empty world map with the default settings provided by Folium. Open the file in your browser by double-clicking on it and take a look:&lt;/p&gt;
&lt;figure class=&quot;js-lightbox&quot;&gt;&lt;a href=&quot;https://files.realpython.com/media/folium-worldmap-osm.e70aef4bc42c.png&quot; target=&quot;_blank&quot;&gt;&lt;img loading=&quot;lazy&quot; class=&quot;img-fluid mx-auto d-block &quot; src=&quot;https://files.realpython.com/media/folium-worldmap-osm.e70aef4bc42c.png&quot; width=&quot;3840&quot; height=&quot;2160&quot; srcset=&quot;https://robocrop.realpython.net/?url=https%3A//files.realpython.com/media/folium-worldmap-osm.e70aef4bc42c.png&amp;amp;w=960&amp;amp;sig=8ab62c472308066d9f867624c3debece9f3061af 960w, https://robocrop.realpython.net/?url=https%3A//files.realpython.com/media/folium-worldmap-osm.e70aef4bc42c.png&amp;amp;w=1920&amp;amp;sig=da693aa631ec5abd562835bfc77b61632e8913ce 1920w, https://files.realpython.com/media/folium-worldmap-osm.e70aef4bc42c.png 3840w&quot; sizes=&quot;75vw&quot; alt=&quot;Folium world map with the default web map tiles from OpenStreetMap&quot; data-asset=&quot;4790&quot;&gt;&lt;/a&gt;&lt;/figure&gt;

&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python-folium-web-maps-from-data/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-folium-web-maps-from-data/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Using the Terminal on macOS</title>
      <id>https://realpython.com/courses/using-terminal-macos/</id>
      <link href="https://realpython.com/courses/using-terminal-macos/"/>
      <updated>2023-01-10T14:00:00+00:00</updated>
      <summary>In this Code Conversation video course, you&#x27;ll learn how to use the terminal on macOS.
You&#x27;ll navigate the file system with Philipp and Martin and perform common tasks like creating files and folders. If you&#x27;ve never used the terminal before, then this video course will help you get started.</summary>
      <content type="html">
        &lt;p&gt;The &lt;strong&gt;terminal&lt;/strong&gt; can be intimidating to work with when you&amp;rsquo;re used to working with graphical user interfaces. However, it&amp;rsquo;s an important tool that you need to get used to in your journey as a Python developer.
Even though you can substitute some workflows in the terminal with apps that contain a graphical user interface (GUI), you may need to open the terminal at some point in your life as a Python developer.&lt;/p&gt;
&lt;p&gt;In this &lt;strong&gt;Code Conversation&lt;/strong&gt;, you&amp;rsquo;ll follow a chat between Philipp and Martin as they perform common tasks in the terminal on macOS, such as:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Showing the current working directory&lt;/li&gt;
&lt;li&gt;Listing the contents of a folder&lt;/li&gt;
&lt;li&gt;Adding text to files without opening them&lt;/li&gt;
&lt;li&gt;Displaying the content of a file&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Along the way, you&amp;rsquo;ll learn how to:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Find the terminal&lt;/strong&gt; on your operating system&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Open the terminal&lt;/strong&gt; for the first time&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Navigate your filesystem&lt;/strong&gt; with basic commands&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Create files and folders&lt;/strong&gt; with the terminal&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Run Python files&lt;/strong&gt; on macOS&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you&amp;rsquo;ve never worked with the terminal on macOS before or you want to see some interesting use cases to incorporate the terminal into your workflow, then this video course is the perfect start for you.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Learn From 2022&#x27;s Most Popular Python Tutorials and Courses</title>
      <id>https://realpython.com/popular-python-tutorials-2022/</id>
      <link href="https://realpython.com/popular-python-tutorials-2022/"/>
      <updated>2023-01-09T14:00:00+00:00</updated>
      <summary>Revisit some of your favorite Real Python tutorials and video courses from 2022. It&#x27;s been a busy year, with new materials on topics ranging from the basics to web development, machine learning, effective coding environments, and more.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;2022 was a great year for Python. The new &lt;a href=&quot;https://realpython.com/python311-new-features/&quot;&gt;Python 3.11&lt;/a&gt; is 10 to 60 percent faster than 3.10, thanks to the efforts of the ongoing &lt;a href=&quot;https://github.com/faster-cpython/ideas&quot;&gt;Faster CPython&lt;/a&gt; project. Python continues to be &lt;a href=&quot;https://survey.stackoverflow.co/2022/#most-loved-dreaded-and-wanted-language-want&quot;&gt;popular&lt;/a&gt; and has spent the year as the number one programming language on the &lt;a href=&quot;https://www.tiobe.com/tiobe-index/&quot;&gt;TIOBE index&lt;/a&gt;. At the same time, Python has become easier to run in your browser. Python’s WebAssembly port, &lt;a href=&quot;https://pyodide.org/&quot;&gt;Pyodide&lt;/a&gt;, has matured, and the &lt;a href=&quot;https://pyscript.net/&quot;&gt;PyScript&lt;/a&gt; framework has showcased some of its possibilities.&lt;/p&gt;
&lt;p&gt;Over the last year, we’ve published more than a hundred written tutorials and video courses here at Real Python. These cover evergreen topics about the fundamentals of the language, as well as newer features and developments. In this article, you’ll learn more about the most popular content from 2022. You can also listen to the &lt;a href=&quot;https://realpython.com/podcasts/rpp/138/&quot;&gt;2022 Real Python Tutorial &amp;amp; Video Course Wrap Up&lt;/a&gt; podcast episode.&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;&lt;p&gt;&lt;strong&gt;Join Now:&lt;/strong&gt; &lt;a href=&quot;&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-newsletter&quot; data-focus=&quot;false&quot;&gt;Click here to join the Real Python Newsletter&lt;/a&gt; and you&#x27;ll never miss another Python tutorial, course update, or post.&lt;/p&gt;&lt;/div&gt;

&lt;h2 id=&quot;get-your-questions-answered&quot;&gt;Get Your Questions Answered&lt;a class=&quot;headerlink&quot; href=&quot;#get-your-questions-answered&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;figure class=&quot;&quot;&gt;&lt;img loading=&quot;lazy&quot; class=&quot;img-fluid w-33 float-right ml-3 mt-3 mb-3 rounded&quot; src=&quot;https://files.realpython.com/media/How-to-Check-if-a-String-Contains-Another-String_Watermarked.ad5138507ec7.jpg&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;https://robocrop.realpython.net/?url=https%3A//files.realpython.com/media/How-to-Check-if-a-String-Contains-Another-String_Watermarked.ad5138507ec7.jpg&amp;amp;w=480&amp;amp;sig=e25ac8621eaa1804f00ed596dccf2f02edbb4f45 480w, https://robocrop.realpython.net/?url=https%3A//files.realpython.com/media/How-to-Check-if-a-String-Contains-Another-String_Watermarked.ad5138507ec7.jpg&amp;amp;w=960&amp;amp;sig=6648516639d443dee6be0a5d8a371a074068af28 960w, https://files.realpython.com/media/How-to-Check-if-a-String-Contains-Another-String_Watermarked.ad5138507ec7.jpg 1920w&quot; sizes=&quot;75vw&quot; alt=&quot;How to Check if a Python String Contains a Substring&quot; data-asset=&quot;4544&quot;&gt;&lt;/figure&gt;

&lt;p&gt;You’ll find that all Real Python tutorials are well researched, with in-depth information. But sometimes, you’re in the thick of a project, and you need a quick answer before going back to coding. Throughout 2022, you’ve seen several tutorials that focus on getting you quickly up to speed on one topic.&lt;/p&gt;
&lt;p&gt;How-to and question-and-answer articles are some of our new formats. The following are some of the popular examples from the last year:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/python-string-contains-substring/&quot;&gt;How to Check if a Python String Contains a Substring&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/why-close-file-python/&quot;&gt;Why Is It Important to Close Files in Python?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/if-name-main-python/&quot;&gt;What Does if &lt;code&gt;__name__ == &quot;__main__&quot;&lt;/code&gt; Do in Python?&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;But maybe, instead of asking questions, you’re studying the fundamentals. There are plenty of tutorials to get you started on your Python journey!&lt;/p&gt;
&lt;h2 id=&quot;learn-the-basics&quot;&gt;Learn the Basics&lt;a class=&quot;headerlink&quot; href=&quot;#learn-the-basics&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;figure class=&quot;&quot;&gt;&lt;img loading=&quot;lazy&quot; class=&quot;img-fluid w-33 float-right ml-3 mt-3 mb-3 rounded&quot; src=&quot;https://files.realpython.com/media/Python-Basics-Your-First-Python-Program_Watermarked.bee327fe83d3.jpg&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;https://robocrop.realpython.net/?url=https%3A//files.realpython.com/media/Python-Basics-Your-First-Python-Program_Watermarked.bee327fe83d3.jpg&amp;amp;w=480&amp;amp;sig=32a7e2c46179dcb17d36d96e048773297b3e0771 480w, https://robocrop.realpython.net/?url=https%3A//files.realpython.com/media/Python-Basics-Your-First-Python-Program_Watermarked.bee327fe83d3.jpg&amp;amp;w=960&amp;amp;sig=62d056ed0a9eb7476eec392608d3b825e4e60554 960w, https://files.realpython.com/media/Python-Basics-Your-First-Python-Program_Watermarked.bee327fe83d3.jpg 1920w&quot; sizes=&quot;75vw&quot; alt=&quot;Python Basics: Code Your First Python Program&quot; data-asset=&quot;4265&quot;&gt;&lt;/figure&gt;

&lt;p&gt;The latest edition of the &lt;a href=&quot;https://realpython.com/products/python-basics-book/&quot;&gt;&lt;em&gt;Python Basics&lt;/em&gt;&lt;/a&gt; book was published in 2021. This practical introduction to Python covers all the fundamentals from scratch, including how to set up Python and write your first program. You’ll also learn about strings, numbers, lists, dictionaries, and how you use functions, loops, and conditional logic to control the flow of your program.&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; Full access to all Real Python video courses is one of the benefits that you get from joining Real Python. You can learn more about the &lt;a href=&quot;https://realpython.com/join/&quot;&gt;Real Python membership&lt;/a&gt; and see if it’s for you.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;We’re adapting the Python Basics book into a series of video courses. Many of these courses are already available, including these three:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/courses/python-basics-first-program/&quot;&gt;Python Basics: Code Your First Python Program&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/courses/python-basics-scopes/&quot;&gt;Python Basics: Scopes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/courses/python-basics-code-bugs/&quot;&gt;Python Basics: Finding and Fixing Code Bugs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can find all the Python Basics video courses in their designated &lt;a href=&quot;https://realpython.com/learning-paths/python-basics/&quot;&gt;learning path&lt;/a&gt;. There, you’ll also find quizzes so that you can check your understanding of key concepts. The list of courses will continue to grow in 2023, so remember to check back later.&lt;/p&gt;
&lt;h2 id=&quot;go-deep&quot;&gt;Go Deep&lt;a class=&quot;headerlink&quot; href=&quot;#go-deep&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;figure class=&quot;&quot;&gt;&lt;img loading=&quot;lazy&quot; class=&quot;img-fluid w-33 float-right ml-3 mt-3 mb-3 rounded&quot; src=&quot;https://files.realpython.com/media/Python-3.11-Cool-New-Features_Watermarked.1b525fab0b82.jpg&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;https://robocrop.realpython.net/?url=https%3A//files.realpython.com/media/Python-3.11-Cool-New-Features_Watermarked.1b525fab0b82.jpg&amp;amp;w=480&amp;amp;sig=5ce0dccb9acc89da61c6e9d580d207c61dc0766f 480w, https://robocrop.realpython.net/?url=https%3A//files.realpython.com/media/Python-3.11-Cool-New-Features_Watermarked.1b525fab0b82.jpg&amp;amp;w=960&amp;amp;sig=3c237e581b624ce1588bccf74663a99bbfe3510c 960w, https://files.realpython.com/media/Python-3.11-Cool-New-Features_Watermarked.1b525fab0b82.jpg 1920w&quot; sizes=&quot;75vw&quot; alt=&quot;Python 3.11: Cool New Features for You to Try&quot; data-asset=&quot;4670&quot;&gt;&lt;/figure&gt;

&lt;p&gt;Sometimes one article just isn’t enough. One recurring topic in 2022 has been the development of &lt;a href=&quot;https://realpython.com/python311-new-features/&quot;&gt;Python 3.11&lt;/a&gt; and its new features, which you can read about in the Python 3.11 preview series. Additionally, you can explore how to work with a Python REST API or how to build a Twitter-like social network with Django in two other tutorial series.&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/popular-python-tutorials-2022/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/popular-python-tutorials-2022/ »&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 #139: Surveying Comprehension Constructs &amp; Python Parallelism Infighting</title>
      <id>https://realpython.com/podcasts/rpp/139/</id>
      <link href="https://realpython.com/podcasts/rpp/139/"/>
      <updated>2023-01-06T12:00:00+00:00</updated>
      <summary>Have you embraced the use of comprehensions in your Python journey? Are you familiar with all the varieties of comprehension constructs? This week on the show, Christopher Trudeau is here, bringing another batch of PyCoder&#x27;s Weekly articles and projects.</summary>
      <content type="html">
        &lt;p&gt;Have you embraced the use of comprehensions in your Python journey? Are you familiar with all the varieties of comprehension constructs? This week on the show, Christopher Trudeau is here, bringing another batch of PyCoder&#x27;s Weekly articles and projects.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Discover bpython: A Python REPL With IDE-Like Features</title>
      <id>https://realpython.com/bpython-alternative-python-repl/</id>
      <link href="https://realpython.com/bpython-alternative-python-repl/"/>
      <updated>2023-01-04T14:00:00+00:00</updated>
      <summary>In this tutorial, you&#x27;ll learn about bpython, an alternative Python REPL that brings code suggestions and many other IDE-like features to the terminal. Once you discover how much bpython can improve your productivity, you&#x27;ll never want to return to using the vanilla Python REPL again.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;The standard Python interpreter lets you &lt;a href=&quot;https://realpython.com/run-python-scripts/&quot;&gt;run scripts&lt;/a&gt; from files or &lt;a href=&quot;https://realpython.com/interacting-with-python/&quot;&gt;interactively execute code&lt;/a&gt; on the fly in a so-called &lt;strong&gt;read-evaluate-print loop (REPL)&lt;/strong&gt;. While this is a powerful tool for exploring the language and discovering its libraries through instant feedback on your code inputs, the default REPL shipped with Python has several limitations. Luckily, alternatives like &lt;strong&gt;bpython&lt;/strong&gt; offer a much more programmer-friendly and convenient experience.&lt;/p&gt;
&lt;p&gt;You can use bpython to experiment with your code or quickly test an idea without switching contexts between different programs, just like in an &lt;strong&gt;integrated development environment (IDE)&lt;/strong&gt;. In addition, bpython may be a valuable teaching tool in either a virtual or physical classroom.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this tutorial, you’ll learn how to:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Install and use bpython as your &lt;strong&gt;alternative Python REPL&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Boost your &lt;strong&gt;productivity&lt;/strong&gt; thanks to bpython’s unique features&lt;/li&gt;
&lt;li&gt;Tweak bpython’s &lt;strong&gt;configuration&lt;/strong&gt; and its &lt;strong&gt;color theme&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Use common &lt;strong&gt;keyboard shortcuts&lt;/strong&gt; to code more quickly&lt;/li&gt;
&lt;li&gt;Contribute to bpython’s &lt;strong&gt;open-source&lt;/strong&gt; project on GitHub&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Before starting this tutorial, make sure you’re already familiar with &lt;a href=&quot;https://realpython.com/products/python-basics-book/&quot;&gt;Python basics&lt;/a&gt; and know how to start the standard Python REPL in the command line. In addition, you should be able to &lt;a href=&quot;https://realpython.com/what-is-pip/&quot;&gt;install packages with &lt;code&gt;pip&lt;/code&gt;&lt;/a&gt;, ideally into a &lt;a href=&quot;https://realpython.com/python-virtual-environments-a-primer/&quot;&gt;virtual environment&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;To download the configuration files and sample scripts that you’ll use in 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;Source Code:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/bpython-alternative-python-repl-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-bpython-alternative-python-repl-code&quot; data-focus=&quot;false&quot; markdown=&quot;1&quot;&gt;Click here to download the free source code&lt;/a&gt; that you’ll use to harness the power of bpython.&lt;/p&gt;
&lt;/div&gt;
&lt;h2 id=&quot;get-started-with-bpython&quot;&gt;Get Started With bpython&lt;a class=&quot;headerlink&quot; href=&quot;#get-started-with-bpython&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Unlike stand-alone Python distributions, such as &lt;a href=&quot;https://realpython.com/cpython-source-code-guide/&quot;&gt;CPython&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/pypy-faster-python/&quot;&gt;PyPy&lt;/a&gt;, or &lt;a href=&quot;https://www.anaconda.com/products/distribution&quot;&gt;Anaconda&lt;/a&gt;, &lt;a href=&quot;https://pypi.org/project/bpython/&quot;&gt;bpython&lt;/a&gt; is merely a &lt;strong&gt;pure-Python package&lt;/strong&gt; serving as a lightweight wrapper around a chosen Python interpreter. Therefore, you can use bpython on top of any particular Python distribution, version, or even a virtual environment, which gives you plenty of flexibility.&lt;/p&gt;
&lt;div class=&quot;alert alert-primary&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The letter &lt;em&gt;b&lt;/em&gt; in bpython stands for &lt;a href=&quot;https://github.com/bobf&quot;&gt;Bob Farrell&lt;/a&gt;, who’s the original author and maintainer of the tool.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;At the same time, bpython remains a familiar Python REPL with only a few essential features, such as syntax highlighting and auto-completion, borrowed from the full-fledged &lt;a href=&quot;https://realpython.com/python-ides-code-editors-guide/&quot;&gt;Python IDEs&lt;/a&gt;. This &lt;strong&gt;minimalistic approach&lt;/strong&gt; contrasts with tools like &lt;a href=&quot;https://ipython.org/&quot;&gt;IPython&lt;/a&gt;, which is yet another alternative to the standard Python REPL, popular in the data science community. IPython introduces a lot of custom commands and other extras that are unavailable in &lt;a href=&quot;https://en.wikipedia.org/wiki/Vanilla_software&quot;&gt;vanilla&lt;/a&gt; Python.&lt;/p&gt;
&lt;p&gt;There are a few ways to get bpython on your computer. Package managers like &lt;a href=&quot;https://brew.sh/&quot;&gt;Homebrew&lt;/a&gt; or &lt;a href=&quot;https://en.wikipedia.org/wiki/APT_(software)&quot;&gt;APT&lt;/a&gt; offer pre-built versions of bpython for your operating system. However, they’re likely obsolete and hardwired to the system-wide Python interpreter. While you can build the latest bpython version from its source code by hand, it’s better to install it into a &lt;a href=&quot;https://realpython.com/python-virtual-environments-a-primer/&quot;&gt;&lt;strong&gt;virtual environment&lt;/strong&gt;&lt;/a&gt; with &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 gp-VirtualEnv&quot;&gt;(venv)&lt;/span&gt; &lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;python -m pip install bpython
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;It’s common to have bpython installed in several copies across many virtual environments, and that’s fine. This allows you to wrap bpython around the specific Python interpreter that you used to create the virtual environment in the first place.&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; Unfortunately, bpython isn’t natively supported on Windows because it depends on the &lt;a href=&quot;https://en.wikipedia.org/wiki/Curses_(programming_library)&quot;&gt;curses library&lt;/a&gt;, which is only available on Unix-like systems, such as macOS and Linux. The official documentation &lt;a href=&quot;https://docs.bpython-interpreter.org/en/latest/windows.html&quot;&gt;mentions a work-around&lt;/a&gt;, which relies on an unofficial binary for Windows, but it seems not to work anymore. If you’re on Windows, then your best bet is to install the &lt;a href=&quot;https://learn.microsoft.com/en-us/windows/wsl/install&quot;&gt;Windows Subsystem for Linux (WSL)&lt;/a&gt; and use bpython from there.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Once it’s installed, you can start bpython using either of these two commands:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;bpython&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;python -m bpython&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;It’s preferable to choose the more explicit second command, which invokes bpython as a &lt;strong&gt;runnable Python module&lt;/strong&gt;. This way, you’ll ensure that you’re running the bpython program installed into the currently active virtual environment. &lt;/p&gt;
&lt;p&gt;On the other hand, using the bare &lt;code&gt;bpython&lt;/code&gt; command could silently fall back to the program installed globally, if there is one. It could also be aliased to a different executable in your shell, taking precedence over the local &lt;code&gt;bpython&lt;/code&gt; module.&lt;/p&gt;
&lt;p&gt;Here’s an example illustrating the use of bpython against a few different Python interpreters encapsulated within isolated virtual environments:&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;(py2.7)&lt;/span&gt; &lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;python -m bpython
&lt;span class=&quot;hll&quot;&gt;&lt;span class=&quot;go&quot;&gt;bpython version 0.20.1 on top of Python 2.7.18&lt;/span&gt;
&lt;/span&gt;&lt;span class=&quot;hll&quot;&gt;&lt;span class=&quot;go&quot;&gt; ⮑ /home/realpython/py2.7/bin/python&lt;/span&gt;
&lt;/span&gt;&lt;span class=&quot;go&quot;&gt;WARNING: You are using `bpython` on Python 2. Support for Python 2&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt; ⮑ has been deprecated in version 0.19 and might disappear&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt; ⮑ in a future version.&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&amp;gt;&amp;gt;&amp;gt; import platform&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&amp;gt;&amp;gt;&amp;gt; platform.python_version()&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#x27;2.7.18&#x27;&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&amp;gt;&amp;gt;&amp;gt; platform.python_implementation()&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#x27;CPython&#x27;&lt;/span&gt;

&lt;span class=&quot;gp gp-VirtualEnv&quot;&gt;(py3.11)&lt;/span&gt; &lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;python -m bpython
&lt;span class=&quot;hll&quot;&gt;&lt;span class=&quot;go&quot;&gt;bpython version 0.23 on top of Python 3.11.0&lt;/span&gt;
&lt;/span&gt;&lt;span class=&quot;hll&quot;&gt;&lt;span class=&quot;go&quot;&gt; ⮑ /home/realpython/py3.11/bin/python&lt;/span&gt;
&lt;/span&gt;&lt;span class=&quot;go&quot;&gt;&amp;gt;&amp;gt;&amp;gt; import platform&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&amp;gt;&amp;gt;&amp;gt; platform.python_version()&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#x27;3.11.0&#x27;&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&amp;gt;&amp;gt;&amp;gt; platform.python_implementation()&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#x27;CPython&#x27;&lt;/span&gt;

&lt;span class=&quot;gp gp-VirtualEnv&quot;&gt;(pypy)&lt;/span&gt; &lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;python -m bpython
&lt;span class=&quot;hll&quot;&gt;&lt;span class=&quot;go&quot;&gt;bpython version 0.23 on top of Python 3.9.12&lt;/span&gt;
&lt;/span&gt;&lt;span class=&quot;hll&quot;&gt;&lt;span class=&quot;go&quot;&gt; ⮑ /home/realpython/pypy/bin/python&lt;/span&gt;
&lt;/span&gt;&lt;span class=&quot;go&quot;&gt;&amp;gt;&amp;gt;&amp;gt; import platform&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; platform.python_version()&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#x27;3.9.12&#x27;&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&amp;gt;&amp;gt;&amp;gt; platform.python_implementation()&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#x27;PyPy&#x27;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Notice that you use the same command to run bpython from different virtual environments. Each highlighted line indicates the interpreter version and a path to the Python executable that bpython wraps in the current REPL session. You can confirm the Python version and its implementation through the &lt;a href=&quot;https://docs.python.org/3/library/platform.html&quot;&gt;&lt;code&gt;platform&lt;/code&gt;&lt;/a&gt; module from the standard library.&lt;/p&gt;
&lt;div class=&quot;alert alert-primary&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The &lt;a href=&quot;https://realpython.com/django-setup/&quot;&gt;Django web framework&lt;/a&gt; can detect bpython if it’s installed in your virtual environment. The framework will automatically run bpython when you execute the &lt;a href=&quot;https://docs.djangoproject.com/en/4.1/ref/django-admin/#shell&quot;&gt;shell command&lt;/a&gt; to bring up the Python interactive interpreter with your project files on the module search path.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Okay, now that you’ve learned how to install and run bpython as an &lt;strong&gt;alternative Python REPL&lt;/strong&gt;, it’s time to explore its key features. Over the next few sections, you’ll discover several ways that bpython can increase your productivity as a Python programmer, regardless of your skill level.&lt;/p&gt;
&lt;h2 id=&quot;spot-typos-at-a-glance&quot;&gt;Spot Typos at a Glance&lt;a class=&quot;headerlink&quot; href=&quot;#spot-typos-at-a-glance&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/bpython-alternative-python-repl/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/bpython-alternative-python-repl/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Build Cross-Platform GUI Apps With Kivy</title>
      <id>https://realpython.com/courses/cross-platform-gui-apps-kivy/</id>
      <link href="https://realpython.com/courses/cross-platform-gui-apps-kivy/"/>
      <updated>2023-01-03T14:00:00+00:00</updated>
      <summary>In this video course, you&#x27;ll learn how to build a cross-platform mobile application with Python and the Kivy GUI framework. You&#x27;ll discover how to develop an application that can run on your desktop as well as your phone. Then, you&#x27;ll package your app for Windows, Linux, and macOS.</summary>
      <content type="html">
        &lt;p&gt;These days, developers are highly likely to be working on a mobile or web application. Python doesn&amp;rsquo;t have built-in mobile development capabilities, but you can create mobile applications by using libraries like Kivy, &lt;a href=&quot;https://riverbankcomputing.com/software/pyqt/intro&quot;&gt;PyQt&lt;/a&gt;, or even Beeware&amp;rsquo;s &lt;a href=&quot;https://toga.readthedocs.io/en/latest/&quot;&gt;Toga&lt;/a&gt; library.&lt;/p&gt;
&lt;p&gt;These libraries are all major players in the Python mobile space. However, there are some benefits that you&amp;rsquo;ll enjoy if you choose to create mobile applications with &lt;strong&gt;Kivy&lt;/strong&gt;. Not only will your application look the same on all platforms, but you also won&amp;rsquo;t need to compile your code after every change. What&amp;rsquo;s more, you&amp;rsquo;ll be able to use Python&amp;rsquo;s clear syntax to build your applications.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this video course, you&amp;rsquo;ll learn how to:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Work with Kivy &lt;strong&gt;widgets&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Lay out the &lt;strong&gt;user interface (UI)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Add &lt;strong&gt;events&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Use the &lt;strong&gt;KV language&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Create a &lt;strong&gt;calculator application&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Package&lt;/strong&gt; your application for Windows, Linux, and macOS&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Research&lt;/strong&gt; the tools to package for iOS and Android&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To complete this video course, you&amp;rsquo;ll need to be familiar with object-oriented programming. If you&amp;rsquo;re not, then check out Object-Oriented Programming (OOP) in Python 3 as either a &lt;a href=&quot;https://realpython.com/python3-object-oriented-programming/&quot;&gt;written tutorial&lt;/a&gt; or a &lt;a href=&quot;https://realpython.com/courses/intro-object-oriented-programming-oop-python/&quot;&gt;video course&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>Natural Language Processing With spaCy in Python</title>
      <id>https://realpython.com/natural-language-processing-spacy-python/</id>
      <link href="https://realpython.com/natural-language-processing-spacy-python/"/>
      <updated>2023-01-02T14:00:00+00:00</updated>
      <summary>In this step-by-step tutorial, you&#x27;ll learn how to use spaCy. This free and open-source library for natural language processing (NLP) in Python has a lot of built-in capabilities and is becoming increasingly popular for processing and analyzing data in NLP.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;If you want to do &lt;a href=&quot;https://en.wikipedia.org/wiki/Natural_language_processing&quot;&gt;natural language processing&lt;/a&gt; (NLP) in Python, then look no further than &lt;a href=&quot;https://spacy.io/&quot;&gt;spaCy&lt;/a&gt;, a free and open-source library with a lot of built-in capabilities. It’s becoming increasingly popular for processing and analyzing data in the field of NLP.&lt;/p&gt;
&lt;p&gt;Unstructured text is produced by companies, governments, and the general population at an incredible scale. It’s often important to automate the processing and analysis of text that would be impossible for humans to process. To automate the processing and analysis of text, you need to represent the text in a format that can be understood by computers. spaCy can help you do that.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this tutorial, you’ll learn how to:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Implement&lt;/strong&gt; NLP in spaCy&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Customize&lt;/strong&gt; and &lt;strong&gt;extend&lt;/strong&gt; built-in functionalities in spaCy&lt;/li&gt;
&lt;li&gt;Perform basic &lt;strong&gt;statistical analysis&lt;/strong&gt; on a text&lt;/li&gt;
&lt;li&gt;Create a &lt;strong&gt;pipeline&lt;/strong&gt; to process unstructured text&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Parse a sentence&lt;/strong&gt; and extract meaningful insights from it&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you’re new to NLP, don’t worry! Before you start using spaCy, you’ll first learn about the foundational &lt;strong&gt;terms&lt;/strong&gt; and &lt;strong&gt;concepts&lt;/strong&gt; in NLP. You should be familiar with the &lt;a href=&quot;https://realpython.com/products/python-basics-book/&quot;&gt;basics in Python&lt;/a&gt;, though. The code in this tutorial contains &lt;a href=&quot;https://realpython.com/python-dicts/&quot;&gt;dictionaries&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-for-loop/&quot;&gt;&lt;code&gt;for&lt;/code&gt; loops&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/list-comprehension-python/&quot;&gt;comprehensions&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python3-object-oriented-programming/&quot;&gt;object oriented programming&lt;/a&gt;, and &lt;a href=&quot;https://realpython.com/python-lambda/&quot;&gt;lambda functions&lt;/a&gt;, among other fundamental Python concepts.&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown=&quot;1&quot;&gt;Free Source Code:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/natural-language-processing-spacy-python-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-natural-language-processing-spacy-python-code&quot; data-focus=&quot;false&quot; markdown=&quot;1&quot;&gt;Click here to download the free source code&lt;/a&gt; that you’ll use for natural language processing (NLP) in spaCy.&lt;/p&gt;
&lt;/div&gt;
&lt;h2 id=&quot;introduction-to-nlp-and-spacy&quot;&gt;Introduction to NLP and spaCy&lt;a class=&quot;headerlink&quot; href=&quot;#introduction-to-nlp-and-spacy&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;NLP&lt;/strong&gt; is a subfield of &lt;a href=&quot;https://realpython.com/python-ai-neural-network/&quot;&gt;artificial intelligence&lt;/a&gt;, and it’s all about allowing computers to comprehend human language. NLP involves analyzing, quantifying, understanding, and deriving meaning from natural languages.&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; Currently, the most powerful NLP models are transformer based. &lt;a href=&quot;https://en.wikipedia.org/wiki/BERT_(Language_model)&quot;&gt;BERT&lt;/a&gt; from &lt;a href=&quot;https://research.google/research-areas/natural-language-processing/&quot;&gt;Google&lt;/a&gt; and the &lt;a href=&quot;https://en.wikipedia.org/wiki/OpenAI#Generative_models&quot;&gt;GPT family&lt;/a&gt; from &lt;a href=&quot;https://openai.com/&quot;&gt;OpenAI&lt;/a&gt; are examples of such models.&lt;/p&gt;
&lt;p&gt;Since the release of &lt;a href=&quot;https://spacy.io/usage/v3&quot;&gt;version 3.0&lt;/a&gt;, spaCy supports transformer based models. The examples in this tutorial are done with a &lt;a href=&quot;https://spacy.io/models/en&quot;&gt;smaller, CPU-optimized model&lt;/a&gt;. However, you can run the examples &lt;a href=&quot;https://spacy.io/usage/embeddings-transformers#transformers&quot;&gt;with a transformer model&lt;/a&gt; instead. All &lt;a href=&quot;https://huggingface.co/docs/transformers/&quot;&gt;Hugging Face&lt;/a&gt; transformer models can be used with spaCy.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;NLP helps you extract insights from unstructured text and has many use cases, such as:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Automatic_summarization&quot;&gt;Automatic summarization&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Named-entity_recognition&quot;&gt;Named-entity recognition&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Question_answering&quot;&gt;Question answering systems&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/sentiment-analysis-python/&quot;&gt;Sentiment analysis&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;spaCy is a free, open-source library for NLP in Python written in &lt;a href=&quot;https://cython.org/&quot;&gt;Cython&lt;/a&gt;. spaCy is designed to make it easy to build systems for information extraction or general-purpose natural language processing.&lt;/p&gt;
&lt;h2 id=&quot;installation-of-spacy&quot;&gt;Installation of spaCy&lt;a class=&quot;headerlink&quot; href=&quot;#installation-of-spacy&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;In this section, you’ll install spaCy into a virtual environment and then download data and models for the English language.&lt;/p&gt;
&lt;p&gt;You can install spaCy using &lt;strong&gt;&lt;code&gt;pip&lt;/code&gt;&lt;/strong&gt;, a Python package manager. It’s a good idea to use a &lt;strong&gt;virtual environment&lt;/strong&gt; to avoid depending on system-wide packages. To learn more about virtual environments and &lt;code&gt;pip&lt;/code&gt;, check out &lt;a href=&quot;https://realpython.com/what-is-pip/&quot;&gt;Using Python’s pip to Manage Your Projects’ Dependencies&lt;/a&gt; and &lt;a href=&quot;https://realpython.com/python-virtual-environments-a-primer/&quot;&gt;Python Virtual Environments: A Primer&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;First, you’ll create a new virtual environment, activate it, and install spaCy. Select your operating system below to learn how:&lt;/p&gt;
&lt;ul class=&quot;nav nav-tabs justify-content-end js-platform-widget-tabs&quot; role=&quot;tablist&quot;&gt;

  &lt;li class=&quot;nav-item mb-0 js-platform-widget-tab-windows&quot; role=&quot;presentation&quot;&gt;
    &lt;a class=&quot;nav-link link-unstyled text-body active small&quot; id=&quot;windows-tab-1&quot; data-toggle=&quot;tab&quot; href=&quot;#windows-1&quot; role=&quot;tab&quot; aria-controls=&quot;windows-1&quot; aria-selected=&quot;true&quot;&gt;&lt;i class=&quot;fa fa-windows text-muted mr-1&quot; aria-hidden=&quot;true&quot;&gt;&lt;/i&gt;Windows&lt;/a&gt;
  &lt;/li&gt;




  &lt;li class=&quot;nav-item mb-0 js-platform-widget-tab-linuxmacos&quot; role=&quot;presentation&quot;&gt;
    &lt;a class=&quot;nav-link link-unstyled text-body small&quot; id=&quot;macos-tab-1&quot; data-toggle=&quot;tab&quot; href=&quot;#linux-macos-1&quot; role=&quot;tab&quot; aria-controls=&quot;linux-macos-1&quot; aria-selected=&quot;false&quot;&gt;&lt;i class=&quot;fa fa-linux text-muted mr-1&quot; aria-hidden=&quot;true&quot;&gt;&lt;/i&gt;&lt;i class=&quot;fa fa-apple text-muted mr-1&quot; aria-hidden=&quot;true&quot;&gt;&lt;/i&gt;Linux + macOS&lt;/a&gt;
  &lt;/li&gt;

&lt;/ul&gt;
&lt;div class=&quot;tab-content mt-2 mb-0 js-platform-widget-content&quot;&gt;
&lt;div aria-labelledby=&quot;windows-tab-1&quot; class=&quot;tab-pane fade show active&quot; id=&quot;windows-1&quot; role=&quot;tabpanel&quot;&gt;
&lt;div class=&quot;highlight pscon&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;PS&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;python&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;-m&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;venv&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;venv&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;PS&amp;gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;./&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;venv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Scripts&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;activate&lt;/span&gt;
&lt;span class=&quot;gp gp-VirtualEnv&quot;&gt;(venv)&lt;/span&gt; &lt;span class=&quot;gp&quot;&gt;PS&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;python&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;-m&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pip&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;install&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;spacy&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div aria-labelledby=&quot;linux-macos-tab-1&quot; class=&quot;tab-pane fade &quot; id=&quot;linux-macos-1&quot; role=&quot;tabpanel&quot;&gt;
&lt;div class=&quot;highlight sh&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;python -m venv venv
&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;source&lt;/span&gt; ./venv/bin/activate
&lt;span class=&quot;gp gp-VirtualEnv&quot;&gt;(venv)&lt;/span&gt; &lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;python -m pip install spacy
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;With spaCy installed in your virtual environment, you’re almost ready to get started with NLP. But there’s one more thing you’ll have to install:&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;(venv)&lt;/span&gt; &lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;python -m spacy download en_core_web_sm
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;There are various &lt;a href=&quot;https://spaCy.io/models&quot;&gt;spaCy models&lt;/a&gt; for different languages. The default model for the English language is designated as &lt;code&gt;en_core_web_sm&lt;/code&gt;. Since the models are quite large, it’s best to install them separately—including all languages in one package would make the download too massive.&lt;/p&gt;
&lt;p&gt;Once the &lt;code&gt;en_core_web_sm&lt;/code&gt; model has finished downloading, open up a Python REPL and verify that the installation has been successful:&lt;/p&gt;
&lt;div class=&quot;highlight python repl&quot;&gt;&lt;span class=&quot;repl-toggle&quot; title=&quot;Toggle REPL prompts and output&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;spacy&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;nlp&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;spacy&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;load&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;en_core_web_sm&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;If these lines run without any errors, then it means that spaCy was installed and that the models and data were successfully downloaded. You’re now ready to dive into NLP with spaCy!&lt;/p&gt;
&lt;h2 id=&quot;the-doc-object-for-processed-text&quot;&gt;The &lt;code&gt;Doc&lt;/code&gt; Object for Processed Text&lt;a class=&quot;headerlink&quot; href=&quot;#the-doc-object-for-processed-text&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/natural-language-processing-spacy-python/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/natural-language-processing-spacy-python/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast – Episode #138: 2022 Real Python Tutorial &amp; Video Course Wrap Up</title>
      <id>https://realpython.com/podcasts/rpp/138/</id>
      <link href="https://realpython.com/podcasts/rpp/138/"/>
      <updated>2022-12-23T12:00:00+00:00</updated>
      <summary>It&#x27;s been another year of changes at Real Python! The Real Python team has written, edited, curated, illustrated, and produced a mountain of Python material this year. We added some new members to the team, updated the site&#x27;s features, and created new styles of tutorials and video courses.</summary>
      <content type="html">
        &lt;p&gt;It&#x27;s been another year of changes at Real Python! The Real Python team has written, edited, curated, illustrated, and produced a mountain of Python material this year. We added some new members to the team, updated the site&#x27;s features, and created new styles of tutorials and video courses.&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>Generate Images With DALL·E 2 and the OpenAI API</title>
      <id>https://realpython.com/generate-images-with-dalle-openai-api/</id>
      <link href="https://realpython.com/generate-images-with-dalle-openai-api/"/>
      <updated>2022-12-21T14:00:00+00:00</updated>
      <summary>Learn to use the OpenAI Python library to create images with DALL·E, a state-of-the-art latent diffusion model. You&#x27;ll explore image creation and generating image variations. You&#x27;ll interact with DALL·E using API calls, and incorporate this functionality into your Python scripts.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Describe any image, then let a computer create it for you. What sounded futuristic only a few years ago has become reality with advances in &lt;a href=&quot;https://realpython.com/python-ai-neural-network/&quot;&gt;neural networks&lt;/a&gt; and &lt;strong&gt;latent diffusion models&lt;/strong&gt; (LDM). &lt;strong&gt;DALL·E by OpenAI&lt;/strong&gt; has made a splash through the amazing &lt;a href=&quot;https://en.wikipedia.org/wiki/Generative_art&quot;&gt;generative art&lt;/a&gt; and realistic images that people create with it.&lt;/p&gt;
&lt;p&gt;OpenAI now allows access to DALL·E through their &lt;strong&gt;API&lt;/strong&gt;, which means that you can incorporate its functionality into your &lt;strong&gt;Python applications&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this tutorial, you’ll:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Get started using the &lt;strong&gt;OpenAI Python library&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Explore API calls related to &lt;strong&gt;image generation&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Create images from &lt;strong&gt;text prompts&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Create &lt;strong&gt;variations&lt;/strong&gt; of your generated image&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Convert Base64&lt;/strong&gt; JSON responses to &lt;strong&gt;PNG image&lt;/strong&gt; files&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You’ll need some experience with Python, JSON, and file operations to breeze through this tutorial. You can also study up on these topics while you go along, as you’ll find relevant links throughout the text.&lt;/p&gt;
&lt;p&gt;If you haven’t played with &lt;a href=&quot;https://labs.openai.com/&quot;&gt;the web user interface (UI) of DALL·E&lt;/a&gt; before, then try it out before coming back to learn how to use it programmatically with 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;Source Code:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/generate-images-with-dalle-openai-api-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-generate-images-with-dalle-openai-api-code&quot; data-focus=&quot;false&quot; markdown=&quot;1&quot;&gt;Click here to download the free source code&lt;/a&gt; that you’ll use to generate stunning images with DALL·E 2 and the OpenAI API.&lt;/p&gt;
&lt;/div&gt;
&lt;h2 id=&quot;complete-the-setup-requirements&quot;&gt;Complete the Setup Requirements&lt;a class=&quot;headerlink&quot; href=&quot;#complete-the-setup-requirements&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;If you’ve seen what DALL·E can do and you’re eager to make its functionality part of your Python applications, then you’re in the right spot! In this first section, you’ll quickly walk through what you need to do to get started using DALL·E’s image creation capabilities in your own code.&lt;/p&gt;
&lt;h3 id=&quot;install-the-openai-python-library&quot;&gt;Install the OpenAI Python Library&lt;a class=&quot;headerlink&quot; href=&quot;#install-the-openai-python-library&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Confirm that you’re &lt;a href=&quot;https://realpython.com/intro-to-pyenv/#specifying-your-python-version&quot;&gt;running Python version&lt;/a&gt; 3.7.1 or higher, create and activate a &lt;a href=&quot;https://realpython.com/python-virtual-environments-a-primer/&quot;&gt;virtual environment&lt;/a&gt;, and install the &lt;a href=&quot;https://github.com/openai/openai-python&quot;&gt;OpenAI Python library&lt;/a&gt;:&lt;/p&gt;
&lt;ul class=&quot;nav nav-tabs justify-content-end js-platform-widget-tabs&quot; role=&quot;tablist&quot;&gt;

  &lt;li class=&quot;nav-item mb-0 js-platform-widget-tab-windows&quot; role=&quot;presentation&quot;&gt;
    &lt;a class=&quot;nav-link link-unstyled text-body active small&quot; id=&quot;windows-tab-1&quot; data-toggle=&quot;tab&quot; href=&quot;#windows-1&quot; role=&quot;tab&quot; aria-controls=&quot;windows-1&quot; aria-selected=&quot;true&quot;&gt;&lt;i class=&quot;fa fa-windows text-muted mr-1&quot; aria-hidden=&quot;true&quot;&gt;&lt;/i&gt;Windows&lt;/a&gt;
  &lt;/li&gt;




  &lt;li class=&quot;nav-item mb-0 js-platform-widget-tab-linuxmacos&quot; role=&quot;presentation&quot;&gt;
    &lt;a class=&quot;nav-link link-unstyled text-body small&quot; id=&quot;macos-tab-1&quot; data-toggle=&quot;tab&quot; href=&quot;#linux-macos-1&quot; role=&quot;tab&quot; aria-controls=&quot;linux-macos-1&quot; aria-selected=&quot;false&quot;&gt;&lt;i class=&quot;fa fa-linux text-muted mr-1&quot; aria-hidden=&quot;true&quot;&gt;&lt;/i&gt;&lt;i class=&quot;fa fa-apple text-muted mr-1&quot; aria-hidden=&quot;true&quot;&gt;&lt;/i&gt;Linux + macOS&lt;/a&gt;
  &lt;/li&gt;

&lt;/ul&gt;
&lt;div class=&quot;tab-content mt-2 mb-0 js-platform-widget-content&quot;&gt;
&lt;div aria-labelledby=&quot;windows-tab-1&quot; class=&quot;tab-pane fade show active&quot; id=&quot;windows-1&quot; role=&quot;tabpanel&quot;&gt;
&lt;div class=&quot;highlight pscon&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;PS&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;python&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;-version&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;Python 3.11.0&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;PS&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;python&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;-m&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;venv&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;venv&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;PS&amp;gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.\&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;venv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;\&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Scripts&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;\&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;activate&lt;/span&gt;
&lt;span class=&quot;gp gp-VirtualEnv&quot;&gt;(venv)&lt;/span&gt; &lt;span class=&quot;gp&quot;&gt;PS&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;python&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;-m&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pip&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;install&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;openai&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div aria-labelledby=&quot;linux-macos-tab-1&quot; class=&quot;tab-pane fade &quot; id=&quot;linux-macos-1&quot; role=&quot;tabpanel&quot;&gt;
&lt;div class=&quot;highlight sh&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;python --version
&lt;span class=&quot;go&quot;&gt;Python 3.11.0&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;python -m venv venv
&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;source&lt;/span&gt; venv/bin/activate
&lt;span class=&quot;gp gp-VirtualEnv&quot;&gt;(venv)&lt;/span&gt; &lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;python -m pip install openai
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The &lt;code&gt;openai&lt;/code&gt; package gives you access to the full &lt;a href=&quot;https://beta.openai.com/docs/api-reference?lang=python&quot;&gt;OpenAI API&lt;/a&gt;. In this tutorial, you’ll focus on the &lt;code&gt;Image&lt;/code&gt; class, which you can use to interact with DALL·E to create and edit images from text prompts.&lt;/p&gt;
&lt;h3 id=&quot;get-your-openai-api-key&quot;&gt;Get Your OpenAI API Key&lt;a class=&quot;headerlink&quot; href=&quot;#get-your-openai-api-key&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;You need an API key to make successful API calls. Sign up for the OpenAI API and create a new API key by clicking on the dropdown menu on your profile and &lt;a href=&quot;https://beta.openai.com/account/api-keys&quot;&gt;selecting &lt;em&gt;View API keys&lt;/em&gt;&lt;/a&gt;:&lt;/p&gt;
&lt;figure class=&quot;js-lightbox&quot;&gt;&lt;a href=&quot;https://files.realpython.com/media/openai-api-key-page.5aa1e51f6ba2.png&quot; target=&quot;_blank&quot;&gt;&lt;img loading=&quot;lazy&quot; class=&quot;img-fluid mx-auto d-block border &quot; src=&quot;https://files.realpython.com/media/openai-api-key-page.5aa1e51f6ba2.png&quot; width=&quot;2768&quot; height=&quot;1654&quot; srcset=&quot;https://robocrop.realpython.net/?url=https%3A//files.realpython.com/media/openai-api-key-page.5aa1e51f6ba2.png&amp;amp;w=692&amp;amp;sig=554145eda43368b3242270f0f035298a1895f55b 692w, https://robocrop.realpython.net/?url=https%3A//files.realpython.com/media/openai-api-key-page.5aa1e51f6ba2.png&amp;amp;w=1384&amp;amp;sig=bccfb8e1697166da4f84c96ea08cade884555678 1384w, https://files.realpython.com/media/openai-api-key-page.5aa1e51f6ba2.png 2768w&quot; sizes=&quot;75vw&quot; alt=&quot;API key page in the OpenAI web UI profile window&quot; data-asset=&quot;4723&quot;&gt;&lt;/a&gt;&lt;/figure&gt;

&lt;p&gt;On this page, you can manage your API keys, which allow you to access the service that OpenAI offers through their API. You can create and delete secret keys.&lt;/p&gt;
&lt;p&gt;Click on &lt;em&gt;Create new secret key&lt;/em&gt; to create a new API key, and copy the value shown in the pop-up window:&lt;/p&gt;
&lt;figure class=&quot;js-lightbox&quot;&gt;&lt;a href=&quot;https://files.realpython.com/media/openai-secret-key-generated.8da038285fed.png&quot; target=&quot;_blank&quot;&gt;&lt;img loading=&quot;lazy&quot; class=&quot;img-fluid mx-auto d-block border &quot; src=&quot;https://files.realpython.com/media/openai-secret-key-generated.8da038285fed.png&quot; width=&quot;2768&quot; height=&quot;1654&quot; srcset=&quot;https://robocrop.realpython.net/?url=https%3A//files.realpython.com/media/openai-secret-key-generated.8da038285fed.png&amp;amp;w=692&amp;amp;sig=12a3023372dc838c8acd9d5b55c30709a3b7ddbe 692w, https://robocrop.realpython.net/?url=https%3A//files.realpython.com/media/openai-secret-key-generated.8da038285fed.png&amp;amp;w=1384&amp;amp;sig=2aeb95311435f0e81caac82133c0f3a4780dbaa8 1384w, https://files.realpython.com/media/openai-secret-key-generated.8da038285fed.png 2768w&quot; sizes=&quot;75vw&quot; alt=&quot;Pop up window displaying the generated secret API key&quot; data-asset=&quot;4724&quot;&gt;&lt;/a&gt;&lt;/figure&gt;

&lt;p&gt;Always keep this key secret! Copy the value of this key so you can later use it in your project. You’ll only see the key value once.&lt;/p&gt;
&lt;h3 id=&quot;save-your-api-key-as-an-environment-variable&quot;&gt;Save Your API Key as an Environment Variable&lt;a class=&quot;headerlink&quot; href=&quot;#save-your-api-key-as-an-environment-variable&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;A quick way to save your API key and make it available to your Python scripts is to save it as an &lt;strong&gt;environment variable&lt;/strong&gt;. Select your operating system to learn how:&lt;/p&gt;
&lt;ul class=&quot;nav nav-tabs justify-content-end js-platform-widget-tabs&quot; role=&quot;tablist&quot;&gt;

  &lt;li class=&quot;nav-item mb-0 js-platform-widget-tab-windows&quot; role=&quot;presentation&quot;&gt;
    &lt;a class=&quot;nav-link link-unstyled text-body active small&quot; id=&quot;windows-tab-2&quot; data-toggle=&quot;tab&quot; href=&quot;#windows-2&quot; role=&quot;tab&quot; aria-controls=&quot;windows-2&quot; aria-selected=&quot;true&quot;&gt;&lt;i class=&quot;fa fa-windows text-muted mr-1&quot; aria-hidden=&quot;true&quot;&gt;&lt;/i&gt;Windows&lt;/a&gt;
  &lt;/li&gt;




  &lt;li class=&quot;nav-item mb-0 js-platform-widget-tab-linuxmacos&quot; role=&quot;presentation&quot;&gt;
    &lt;a class=&quot;nav-link link-unstyled text-body small&quot; id=&quot;macos-tab-2&quot; data-toggle=&quot;tab&quot; href=&quot;#linux-macos-2&quot; role=&quot;tab&quot; aria-controls=&quot;linux-macos-2&quot; aria-selected=&quot;false&quot;&gt;&lt;i class=&quot;fa fa-linux text-muted mr-1&quot; aria-hidden=&quot;true&quot;&gt;&lt;/i&gt;&lt;i class=&quot;fa fa-apple text-muted mr-1&quot; aria-hidden=&quot;true&quot;&gt;&lt;/i&gt;Linux + macOS&lt;/a&gt;
  &lt;/li&gt;

&lt;/ul&gt;
&lt;div class=&quot;tab-content mt-2 mb-0 js-platform-widget-content&quot;&gt;
&lt;div aria-labelledby=&quot;windows-tab-2&quot; class=&quot;tab-pane fade show active&quot; id=&quot;windows-2&quot; role=&quot;tabpanel&quot;&gt;
&lt;div class=&quot;highlight pscon&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp gp-VirtualEnv&quot;&gt;(venv)&lt;/span&gt; &lt;span class=&quot;gp&quot;&gt;PS&amp;gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$ENV:OPENAI_API_KEY&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&amp;lt;your-key-value-here&amp;gt;&quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div aria-labelledby=&quot;linux-macos-tab-2&quot; class=&quot;tab-pane fade &quot; id=&quot;linux-macos-2&quot; role=&quot;tabpanel&quot;&gt;
&lt;div class=&quot;highlight sh&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp gp-VirtualEnv&quot;&gt;(venv)&lt;/span&gt; &lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;export&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;OPENAI_API_KEY&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&amp;lt;your-key-value-here&amp;gt;&quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/generate-images-with-dalle-openai-api/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/generate-images-with-dalle-openai-api/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Python Basics: File System Operations</title>
      <id>https://realpython.com/courses/python-basics-file-system-operations/</id>
      <link href="https://realpython.com/courses/python-basics-file-system-operations/"/>
      <updated>2022-12-20T14:00:00+00:00</updated>
      <summary>In this video course, you&#x27;ll learn how to use the pathlib module to carry out file path operations with Python. These operations include creating, iterating over, searching for, moving, and deleting files and folders.</summary>
      <content type="html">
        &lt;p&gt;So far, you&amp;rsquo;ve written programs that get their input from one of two
sources: the user or the program itself. Program output has been limited
to displaying some text in IDLE&amp;rsquo;s interactive window.&lt;/p&gt;
&lt;p&gt;These &lt;strong&gt;input&lt;/strong&gt; and &lt;strong&gt;output&lt;/strong&gt; strategies aren&amp;rsquo;t useful in several common
scenarios, such as when:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The input values are unknown while writing the program.&lt;/li&gt;
&lt;li&gt;The program requires more data than a user can be expected to type in by themselves.&lt;/li&gt;
&lt;li&gt;Output must be shared with others after the program runs.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This is where &lt;strong&gt;files&lt;/strong&gt; come in. You&amp;rsquo;ve likely been working with computer files for a long time. Even
so, there are some things that programmers need to know about files
that general users do not. Specifically, you&amp;rsquo;ll want to master some &lt;strong&gt;file system operations&lt;/strong&gt; using the &lt;strong&gt;&lt;code&gt;pathlib&lt;/code&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;code&gt;shutil&lt;/code&gt;&lt;/strong&gt; modules.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this video course, you&amp;rsquo;ll learn how to:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Create&lt;/strong&gt; files and directories&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Iterate over&lt;/strong&gt; the contents of a directory&lt;/li&gt;
&lt;li&gt;Search for files and folders using &lt;strong&gt;wildcards&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Move&lt;/strong&gt; and &lt;strong&gt;delete&lt;/strong&gt; files and folders&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This video course is part of the Python Basics series, which accompanies &lt;a href=&quot;https://realpython.com/products/python-basics-book/&quot;&gt;&lt;em&gt;Python Basics: A Practical Introduction to Python 3&lt;/em&gt;&lt;/a&gt;. You can also check out the other &lt;a href=&quot;https://realpython.com/learning-paths/python-basics/&quot;&gt;Python Basics courses&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;Note that you&amp;rsquo;ll be using &lt;a href=&quot;https://realpython.com/python-idle/&quot;&gt;IDLE&lt;/a&gt; to &lt;a href=&quot;https://realpython.com/interacting-with-python/&quot;&gt;interact with Python&lt;/a&gt; throughout this course. If you&amp;rsquo;re just getting started, then you might want to check out &lt;a href=&quot;https://realpython.com/courses/setting-up-python/&quot;&gt;Python Basics: Setting Up Python&lt;/a&gt; before diving into this course.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Python&#x27;s &quot;in&quot; and &quot;not in&quot; Operators: Check for Membership</title>
      <id>https://realpython.com/python-in-operator/</id>
      <link href="https://realpython.com/python-in-operator/"/>
      <updated>2022-12-19T14:00:00+00:00</updated>
      <summary>In this tutorial, you&#x27;ll learn how to check if a given value is present or absent in a collection of values using Python&#x27;s in and not in operators, respectively. This type of check is known as membership test in Python.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Python’s &lt;strong&gt;&lt;code&gt;in&lt;/code&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;code&gt;not in&lt;/code&gt;&lt;/strong&gt; operators allow you to quickly determine if a given value is or isn’t part of a collection of values. This type of check is common in programming, and it’s generally known as a &lt;strong&gt;membership test&lt;/strong&gt; in Python. Therefore, these operators are known as &lt;strong&gt;membership operators&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this tutorial, you’ll learn how to:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Perform &lt;strong&gt;membership tests&lt;/strong&gt; using the &lt;strong&gt;&lt;code&gt;in&lt;/code&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;code&gt;not in&lt;/code&gt;&lt;/strong&gt; operators&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;in&lt;/code&gt; and &lt;code&gt;not in&lt;/code&gt; with different &lt;strong&gt;data types&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Work with &lt;code&gt;operator.contains()&lt;/code&gt;, the &lt;strong&gt;equivalent function&lt;/strong&gt; to the &lt;code&gt;in&lt;/code&gt; operator&lt;/li&gt;
&lt;li&gt;Provide support for &lt;code&gt;in&lt;/code&gt; and &lt;code&gt;not in&lt;/code&gt; in your &lt;strong&gt;own classes&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To get the most out of this tutorial, you’ll need basic knowledge of Python, including built-in data types, such as &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-range/&quot;&gt;ranges&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python-strings/&quot;&gt;strings&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python-sets/&quot;&gt;sets&lt;/a&gt;, and &lt;a href=&quot;https://realpython.com/python-dicts/&quot;&gt;dictionaries&lt;/a&gt;. You’ll also need to know about Python &lt;a href=&quot;https://realpython.com/introduction-to-python-generators/&quot;&gt;generators&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/list-comprehension-python/&quot;&gt;comprehensions&lt;/a&gt;, and &lt;a href=&quot;https://realpython.com/python3-object-oriented-programming/#define-a-class-in-python&quot;&gt;classes&lt;/a&gt;.&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown=&quot;1&quot;&gt;Source Code:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/python-in-operator-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-python-in-operator-code&quot; data-focus=&quot;false&quot; markdown=&quot;1&quot;&gt;Click here to download the free source code&lt;/a&gt; that you’ll use to perform membership tests in Python with &lt;code&gt;in&lt;/code&gt; and &lt;code&gt;not in&lt;/code&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;h2 id=&quot;getting-started-with-membership-tests-in-python&quot;&gt;Getting Started With Membership Tests in Python&lt;a class=&quot;headerlink&quot; href=&quot;#getting-started-with-membership-tests-in-python&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Sometimes you need to find out whether a value is present in a collection of values or not. In other words, you need to check if a given value is or is not a &lt;strong&gt;member&lt;/strong&gt; of a collection of values. This kind of check is commonly known as a &lt;a href=&quot;https://docs.python.org/3/reference/expressions.html#membership-test-operations&quot;&gt;membership test&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Arguably, the natural way to perform this kind of check is to iterate over the values and compare them with the target value. You can do this with the help of a &lt;a href=&quot;https://realpython.com/python-for-loop/&quot;&gt;&lt;code&gt;for&lt;/code&gt; loop&lt;/a&gt; and a &lt;a href=&quot;https://realpython.com/python-conditional-statements/&quot;&gt;conditional statement&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Consider the following &lt;code&gt;is_member()&lt;/code&gt; function:&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;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;is_member&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;iterable&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;item&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;iterable&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;value&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;is&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;item&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;or&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;value&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;... &lt;/span&gt;            &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;True&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;False&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;...&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This function takes two arguments, the target &lt;code&gt;value&lt;/code&gt; and a collection of values, which is generically called &lt;code&gt;iterable&lt;/code&gt;. The loop iterates over &lt;code&gt;iterable&lt;/code&gt; while the conditional statement checks if the target &lt;code&gt;value&lt;/code&gt; is equal to the current value. Note that the condition checks for &lt;a href=&quot;https://realpython.com/python-is-identity-vs-equality/#comparing-identity-with-the-python-is-and-is-not-operators&quot;&gt;object identity&lt;/a&gt; with &lt;code&gt;is&lt;/code&gt; or for &lt;a href=&quot;https://realpython.com/python-is-identity-vs-equality/#comparing-equality-with-the-python-and-operators&quot;&gt;value equality&lt;/a&gt; with the equality operator (&lt;code&gt;==&lt;/code&gt;). These are slightly different but complementary tests.&lt;/p&gt;
&lt;p&gt;If the condition is true, then the function &lt;a href=&quot;https://realpython.com/python-return-statement/&quot;&gt;returns&lt;/a&gt; &lt;code&gt;True&lt;/code&gt;, breaking out of the loop. This early return &lt;a href=&quot;https://realpython.com/python-return-statement/#short-circuiting-loops&quot;&gt;short-circuits&lt;/a&gt; the loop operation. If the loop finishes without any match, then the function returns &lt;code&gt;False&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;is_member&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;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;5&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;mi&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;True&lt;/span&gt;

&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;is_member&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;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;5&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;mi&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;False&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The first call to &lt;code&gt;is_member()&lt;/code&gt; returns &lt;code&gt;True&lt;/code&gt; because the target value, &lt;code&gt;5&lt;/code&gt;, is a member of the list at hand, &lt;code&gt;[2, 3, 5, 9, 7]&lt;/code&gt;. The second call to the function returns &lt;code&gt;False&lt;/code&gt; because &lt;code&gt;8&lt;/code&gt; isn’t present in the input list of values.&lt;/p&gt;
&lt;p&gt;Membership tests like the ones above are so common and useful in programming that Python has dedicated operators to perform these types of checks. You can get to know the &lt;strong&gt;membership operators&lt;/strong&gt; in the following table:&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 class=&quot;text-left&quot;&gt;Operator&lt;/th&gt;
&lt;th class=&quot;text-left&quot;&gt;Description&lt;/th&gt;
&lt;th class=&quot;text-left&quot;&gt;Syntax&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td class=&quot;text-left&quot;&gt;&lt;a href=&quot;https://docs.python.org/3/reference/expressions.html#in&quot;&gt;&lt;code&gt;in&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td class=&quot;text-left&quot;&gt;Returns &lt;code&gt;True&lt;/code&gt; if the target value &lt;em&gt;is&lt;/em&gt; present in a collection of values. Otherwise, it returns &lt;code&gt;False&lt;/code&gt;.&lt;/td&gt;
&lt;td class=&quot;text-left&quot;&gt;&lt;code&gt;value in collection&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&quot;text-left&quot;&gt;&lt;a href=&quot;https://docs.python.org/3/reference/expressions.html#not-in&quot;&gt;&lt;code&gt;not in&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td class=&quot;text-left&quot;&gt;Returns &lt;code&gt;True&lt;/code&gt; if the target value is &lt;em&gt;not&lt;/em&gt; present in a given collection of values. Otherwise, it returns &lt;code&gt;False&lt;/code&gt;.&lt;/td&gt;
&lt;td class=&quot;text-left&quot;&gt;&lt;code&gt;value not in collection&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;As with &lt;a href=&quot;https://realpython.com/python-boolean/&quot;&gt;Boolean operators&lt;/a&gt;, Python favors readability by using common English words instead of potentially confusing symbols as operators.&lt;/p&gt;
&lt;div class=&quot;alert alert-primary&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Don’t confuse the &lt;code&gt;in&lt;/code&gt; &lt;a href=&quot;https://realpython.com/python-keywords/&quot;&gt;keyword&lt;/a&gt; when it works as the membership operator with the &lt;code&gt;in&lt;/code&gt; keyword in the &lt;code&gt;for&lt;/code&gt; loop syntax. They have entirely different meanings. The &lt;code&gt;in&lt;/code&gt; operator checks if a value is in a collection of values, while the &lt;code&gt;in&lt;/code&gt; keyword in a &lt;code&gt;for&lt;/code&gt; loop indicates the iterable that you want to draw from.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Like many other operators, &lt;code&gt;in&lt;/code&gt; and &lt;code&gt;not in&lt;/code&gt; are binary operators. That means you can create expressions by connecting two operands. In this case, those are:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Left operand:&lt;/strong&gt; The target value that you want to look for in a collection of values&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Right operand:&lt;/strong&gt; The collection of values where the target value may be found&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The syntax of a membership test looks something 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;n&quot;&gt;value&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;collection&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;value&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;collection&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;In these expressions, &lt;code&gt;value&lt;/code&gt; can be any Python object. Meanwhile, &lt;code&gt;collection&lt;/code&gt; can be any data type that can hold collections of values, including &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-strings/&quot;&gt;strings&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python-sets/&quot;&gt;sets&lt;/a&gt;, and &lt;a href=&quot;https://realpython.com/python-dicts/&quot;&gt;dictionaries&lt;/a&gt;. It can also be a class that implements the &lt;code&gt;.__contains__()&lt;/code&gt; method or a user-defined class that explicitly supports membership tests or iteration.&lt;/p&gt;
&lt;p&gt;If you use the &lt;code&gt;in&lt;/code&gt; and &lt;code&gt;not in&lt;/code&gt; operators correctly, then the expressions that you build with them will always evaluate to a &lt;a href=&quot;https://realpython.com/python-boolean/&quot;&gt;Boolean&lt;/a&gt; value. In other words, those expressions will always return either &lt;code&gt;True&lt;/code&gt; or &lt;code&gt;False&lt;/code&gt;. On the other hand, if you try and find a value in something that doesn’t support membership tests, then you’ll get a &lt;a href=&quot;https://realpython.com/python-traceback/#typeerror&quot;&gt;&lt;code&gt;TypeError&lt;/code&gt;&lt;/a&gt;. &lt;a href=&quot;#using-in-and-not-in-with-different-python-types&quot;&gt;Later&lt;/a&gt;, you’ll learn more about the Python data types that support membership tests.&lt;/p&gt;
&lt;p&gt;Because membership operators always evaluate to a Boolean value, Python considers them Boolean operators just like the &lt;a href=&quot;https://realpython.com/python-and-operator/&quot;&gt;&lt;code&gt;and&lt;/code&gt;&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python-or-operator/&quot;&gt;&lt;code&gt;or&lt;/code&gt;&lt;/a&gt;, and &lt;a href=&quot;https://realpython.com/python-not-operator/&quot;&gt;&lt;code&gt;not&lt;/code&gt;&lt;/a&gt; operators.&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python-in-operator/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-in-operator/ »&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 #137: Start Using a Build System &amp; Continuous Integration in Python</title>
      <id>https://realpython.com/podcasts/rpp/137/</id>
      <link href="https://realpython.com/podcasts/rpp/137/"/>
      <updated>2022-12-16T12:00:00+00:00</updated>
      <summary>What advantages can a build system provide for a Python developer? What new skills are required when working with a team of developers? This week on the show, Benjy Weinberger from Toolchain is here to discuss the Pants build system and getting started with continuous integration (CI).</summary>
      <content type="html">
        &lt;p&gt;What advantages can a build system provide for a Python developer? What new skills are required when working with a team of developers? This week on the show, Benjy Weinberger from Toolchain is here to discuss the Pants build system and getting started with continuous integration (CI).&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>Context Managers and Python&#x27;s with Statement</title>
      <id>https://realpython.com/courses/with-statement-python/</id>
      <link href="https://realpython.com/courses/with-statement-python/"/>
      <updated>2022-12-13T14:00:00+00:00</updated>
      <summary>In this video course, you&#x27;ll learn what the Python with statement is and how to use it with existing context managers. You&#x27;ll also learn how to create your own context managers.</summary>
      <content type="html">
        &lt;p&gt;The &lt;code&gt;with&lt;/code&gt; statement in Python is a quite useful tool for properly managing external resources in your programs. It allows you to take advantage of existing &lt;strong&gt;context managers&lt;/strong&gt; to automatically handle the setup and teardown phases whenever you&amp;rsquo;re dealing with external resources or with operations that require those phases.&lt;/p&gt;
&lt;p&gt;What&amp;rsquo;s a context manager? It&amp;rsquo;s a block of code that has side effects upon entering and exiting. The &lt;strong&gt;context management protocol&lt;/strong&gt; allows you to create your own context managers so you can customize the way you deal with system resources.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this video course, you&amp;rsquo;ll learn:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;How &lt;strong&gt;context managers&lt;/strong&gt; work&lt;/li&gt;
&lt;li&gt;Some common context managers in the Python &lt;strong&gt;standard library&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;How to write a &lt;strong&gt;custom&lt;/strong&gt; context manager&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;With this knowledge, you&amp;rsquo;ll write more expressive code and avoid &lt;a href=&quot;https://en.wikipedia.org/wiki/Resource_leak&quot;&gt;resource leaks&lt;/a&gt; in your programs.&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 #136: Package Python Code With pyproject.toml &amp; Listing Files With pathlib</title>
      <id>https://realpython.com/podcasts/rpp/136/</id>
      <link href="https://realpython.com/podcasts/rpp/136/"/>
      <updated>2022-12-09T12:00:00+00:00</updated>
      <summary>How do you start packaging your code with pyproject.toml? Would you like to join a conversation that gently walks you through setting up your Python projects to share? This week on the show, Christopher Trudeau is here, bringing another batch of PyCoder&#x27;s Weekly articles and projects.</summary>
      <content type="html">
        &lt;p&gt;How do you start packaging your code with pyproject.toml? Would you like to join a conversation that gently walks you through setting up your Python projects to share? This week on the show, Christopher Trudeau is here, bringing another batch of PyCoder&#x27;s Weekly articles and projects.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Python Basics: Dictionaries</title>
      <id>https://realpython.com/courses/python-basics-dictionaries/</id>
      <link href="https://realpython.com/courses/python-basics-dictionaries/"/>
      <updated>2022-12-06T14:00:00+00:00</updated>
      <summary>One of the most useful data structures in Python is the dictionary. In this video course, you’ll learn what a dictionary is, how dictionaries differ from lists and tuples, and how to define and use dictionaries in your own code.</summary>
      <content type="html">
        &lt;p&gt;In plain English, a dictionary is a book containing the definitions of words. Each entry in a dictionary has two parts: the word being defined, and its definition.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Python dictionaries&lt;/strong&gt;, like lists and tuples, store a collection of objects. However, instead of storing objects in a sequence, dictionaries hold
information in pairs of data called &lt;strong&gt;key-value pairs&lt;/strong&gt;. That is, each object in a dictionary has two parts: a &lt;strong&gt;key&lt;/strong&gt; and a &lt;strong&gt;value&lt;/strong&gt;. Each key is assigned a single value, which defines the relationship between the two sets.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this video course, you&amp;rsquo;ll learn:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;What a dictionary &lt;strong&gt;is&lt;/strong&gt; and how it&amp;rsquo;s &lt;strong&gt;structured&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;How dictionaries &lt;strong&gt;differ&lt;/strong&gt; from other data structures&lt;/li&gt;
&lt;li&gt;How to &lt;strong&gt;define&lt;/strong&gt; and &lt;strong&gt;use&lt;/strong&gt; dictionaries in your own code&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This video course is part of the Python Basics series, which accompanies &lt;a href=&quot;https://realpython.com/products/python-basics-book/&quot;&gt;&lt;em&gt;Python Basics: A Practical Introduction to Python 3&lt;/em&gt;&lt;/a&gt;. You can also check out the other &lt;a href=&quot;https://realpython.com/learning-paths/python-basics/&quot;&gt;Python Basics courses&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;Note that you&amp;rsquo;ll be using &lt;a href=&quot;https://realpython.com/python-idle/&quot;&gt;IDLE&lt;/a&gt; to &lt;a href=&quot;https://realpython.com/interacting-with-python/&quot;&gt;interact with Python&lt;/a&gt; throughout this course.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast – Episode #135: Preparing Data to Measure True Machine Learning Model Performance</title>
      <id>https://realpython.com/podcasts/rpp/135/</id>
      <link href="https://realpython.com/podcasts/rpp/135/"/>
      <updated>2022-12-02T12:00:00+00:00</updated>
      <summary>How do you prepare a dataset for machine learning (ML)? How do you go beyond cleaning the data and move toward measuring how the model performs? This week on the show, Jodie Burchell, developer advocate for data science at JetBrains, returns to talk about strategies for better ML model performance.</summary>
      <content type="html">
        &lt;p&gt;How do you prepare a dataset for machine learning (ML)? How do you go beyond cleaning the data and move toward measuring how the model performs? This week on the show, Jodie Burchell, developer advocate for data science at JetBrains, returns to talk about strategies for better ML model performance.&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 Python&#x27;s pathlib Module</title>
      <id>https://realpython.com/courses/pathlib-python/</id>
      <link href="https://realpython.com/courses/pathlib-python/"/>
      <updated>2022-11-29T14:00:00+00:00</updated>
      <summary>In this video course, you&#x27;ll learn how to effectively work with file system paths in Python 3 using the pathlib module in the standard library.</summary>
      <content type="html">
        &lt;p&gt;Have you struggled with &lt;strong&gt;file path handling&lt;/strong&gt; in Python? With the &lt;strong&gt;&lt;code&gt;pathlib&lt;/code&gt;&lt;/strong&gt; module, the struggle is now over! You no longer need to scratch your head over code 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;path&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;rsplit&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\\&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;maxsplit&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&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;And you don&amp;rsquo;t have to cringe at the verbosity of something 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;os&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;path&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;isfile&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;os&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;path&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;os&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;path&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;expanduser&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;~&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;realpython.txt&amp;#39;&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;&lt;strong&gt;In this video course, you&amp;rsquo;ll learn how to:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Work with &lt;strong&gt;file paths&lt;/strong&gt; in Python&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Read&lt;/strong&gt; and &lt;strong&gt;write&lt;/strong&gt; files in new ways&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Manipulate&lt;/strong&gt; paths and the underlying file system&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;List&lt;/strong&gt; files and &lt;strong&gt;iterate&lt;/strong&gt; over them&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Using the &lt;code&gt;pathlib&lt;/code&gt; module, the two examples above can be rewritten using elegant, readable, and Pythonic 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;path&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;parent&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pathlib&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Path&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;home&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;s1&quot;&gt;&amp;#39;realpython.txt&amp;#39;&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;is_file&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;That&amp;rsquo;s what you&amp;rsquo;ll master in this video course!&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast – Episode #134: Building Python REST APIs With Flask &amp; Structuring Pull Requests</title>
      <id>https://realpython.com/podcasts/rpp/134/</id>
      <link href="https://realpython.com/podcasts/rpp/134/"/>
      <updated>2022-11-25T12:00:00+00:00</updated>
      <summary>How do you build a REST API using the Flask web framework? How can you quickly add endpoints while automatically generating documentation? This week on the show, Real Python author Philipp Acsany is here to discuss his tutorial series &quot;Python REST APIs With Flask, Connexion, and SQLAlchemy.&quot; Christopher Trudeau is also here with another batch of PyCoder&#x27;s Weekly articles and projects.</summary>
      <content type="html">
        &lt;p&gt;How do you build a REST API using the Flask web framework? How can you quickly add endpoints while automatically generating documentation? This week on the show, Real Python author Philipp Acsany is here to discuss his tutorial series &quot;Python REST APIs With Flask, Connexion, and SQLAlchemy.&quot; Christopher Trudeau is also here with 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>Everyday Project Packaging With pyproject.toml</title>
      <id>https://realpython.com/courses/packaging-with-pyproject-toml/</id>
      <link href="https://realpython.com/courses/packaging-with-pyproject-toml/"/>
      <updated>2022-11-22T14:00:00+00:00</updated>
      <summary>In this Code Conversation video course, you&#x27;ll learn how to package your everyday projects with pyproject.toml. Playing on the same team as the import system means you can call your project from anywhere, ensure consistent imports, and have one file that&#x27;ll work for many build systems.</summary>
      <content type="html">
        &lt;p&gt;&lt;strong&gt;Packaging&lt;/strong&gt; is often associated with publishing a project on &lt;a href=&quot;https://realpython.com/pypi-publish-python-package/&quot;&gt;PyPI&lt;/a&gt;, which can make you bypass packaging as something you don&amp;rsquo;t need to worry about at the start of your project. Python packaging has also had a long history and can be overwhelming for all levels of programmers. But it doesn&amp;rsquo;t have to be a scary process!&lt;/p&gt;
&lt;p&gt;In this &lt;strong&gt;Code Conversation&lt;/strong&gt;, you&amp;rsquo;ll follow a chat between Ian and Geir Arne demonstrating the relatively new, officially sanctioned way of setting up your &lt;a href=&quot;https://realpython.com/tutorials/projects/&quot;&gt;Python projects&lt;/a&gt; using a &lt;strong&gt;&lt;code&gt;pyproject.toml&lt;/code&gt; file&lt;/strong&gt; and installing your package with &lt;strong&gt;&lt;code&gt;pip&lt;/code&gt;&lt;/strong&gt;. This offers nice benefits, such as:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Being able to call your project from anywhere&lt;/li&gt;
&lt;li&gt;Playing on the same team as the import system&lt;/li&gt;
&lt;li&gt;Allowing for consistent imports&lt;/li&gt;
&lt;li&gt;Having one file that&amp;rsquo;ll work for many build systems&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Along the way, you&amp;rsquo;ll:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Structure files and folders&lt;/strong&gt; in your project&lt;/li&gt;
&lt;li&gt;Understand different ways to &lt;strong&gt;run your script&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Explore how the &lt;strong&gt;import system&lt;/strong&gt; works&lt;/li&gt;
&lt;li&gt;Explore the Python &lt;strong&gt;packaging&lt;/strong&gt; world&lt;/li&gt;
&lt;li&gt;Write a &lt;code&gt;pyproject.toml&lt;/code&gt; file to &lt;strong&gt;configure your package&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Install your pacakge&lt;/strong&gt; with &lt;code&gt;pip&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You&amp;rsquo;ll also dive into various rabbit holes along the way as Ian and Geir Arne talk about all the aspects of the process.&lt;/p&gt;
&lt;p&gt;To get the most out of this Code Conversation, you should have a handle on &lt;a href=&quot;https://realpython.com/learning-paths/python3-introduction/&quot;&gt;Python basics&lt;/a&gt;, be able to create a &lt;a href=&quot;https://realpython.com/python-virtual-environments-a-primer/&quot;&gt;virtual environment&lt;/a&gt; and install &lt;a href=&quot;https://realpython.com/python-modules-packages/&quot;&gt;packages&lt;/a&gt;, and have some exposure to the &lt;a href=&quot;https://realpython.com/python-import/&quot;&gt;import system&lt;/a&gt;. Ideally, you have some experience fighting against the import system and thinking that there must be a better way.&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 #133: Moving Projects Away From Passwords With WebAuthn and Python</title>
      <id>https://realpython.com/podcasts/rpp/133/</id>
      <link href="https://realpython.com/podcasts/rpp/133/"/>
      <updated>2022-11-18T12:00:00+00:00</updated>
      <summary>What if you didn&#x27;t have to worry about managing user passwords as a Python developer? That&#x27;s where the WebAuthn protocol and new hardware standards are heading. This week on the show, Dan Moore from FusionAuth returns to discuss a password-less future.</summary>
      <content type="html">
        &lt;p&gt;What if you didn&#x27;t have to worry about managing user passwords as a Python developer? That&#x27;s where the WebAuthn protocol and new hardware standards are heading. This week on the show, Dan Moore from FusionAuth returns to discuss a password-less future.&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>Deploy a Django App With Gunicorn and Nginx</title>
      <id>https://realpython.com/courses/django-app-with-gunicorn-nginx/</id>
      <link href="https://realpython.com/courses/django-app-with-gunicorn-nginx/"/>
      <updated>2022-11-15T14:00:00+00:00</updated>
      <summary>Ready to take your Django app beyond development? Learn how to deploy your Django web app in production on a real-world public domain with Gunicorn and Nginx.</summary>
      <content type="html">
        &lt;p&gt;Taking a &lt;strong&gt;Django&lt;/strong&gt; app from development to production is a demanding but rewarding process. In this video course, you&amp;rsquo;ll go through that process step by step. You&amp;rsquo;ll start at square one with a no-frills Django application then add in &lt;strong&gt;Gunicorn&lt;/strong&gt;, &lt;strong&gt;Nginx&lt;/strong&gt;, and &lt;strong&gt;domain registration&lt;/strong&gt;. After working through this video course, you&amp;rsquo;ll be better equipped to take your Django app into production and serve it to the world.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this video course, you&amp;rsquo;ll learn&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;How you can take your Django app &lt;strong&gt;from development to production&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;How you can &lt;strong&gt;host your app&lt;/strong&gt; on a real-world public domain&lt;/li&gt;
&lt;li&gt;How to introduce &lt;strong&gt;Gunicorn&lt;/strong&gt; and &lt;strong&gt;Nginx&lt;/strong&gt; into the request and response chain&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To make the most out of this video course, you should have an introductory-level &lt;a href=&quot;https://realpython.com/learning-paths/python3-introduction/&quot;&gt;understanding of Python&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/tutorials/django/&quot;&gt;Django&lt;/a&gt;, and the high-level mechanics of HTTP requests.&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>
