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

  
    <entry>
      <title>Web Scraping With Beautiful Soup and Python</title>
      <id>https://realpython.com/courses/web-scraping-beautiful-soup/</id>
      <link href="https://realpython.com/courses/web-scraping-beautiful-soup/"/>
      <updated>2020-10-13T14:00:00+00:00</updated>
      <summary>In this course, you&#x27;ll walk through the main steps of the web scraping process. You&#x27;ll learn how to write a script that uses Python&#x27;s requests library to scrape data from a website. You&#x27;ll also use Beautiful Soup to extract the specific pieces of information that you&#x27;re interested in.</summary>
      <content type="html">
        &lt;p&gt;The incredible amount of data on the Internet is a rich resource for any field of research or personal interest. To effectively harvest that data, you&amp;rsquo;ll need to become skilled at &lt;a href=&quot;https://realpython.com/python-web-scraping-practical-introduction/&quot;&gt;&lt;strong&gt;web scraping&lt;/strong&gt;&lt;/a&gt;. The Python libraries &lt;code&gt;requests&lt;/code&gt; and Beautiful Soup are powerful tools for the job. If you like to learn with hands-on examples and you have a basic understanding of Python and HTML, then this course is for you.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this course, you&amp;rsquo;ll learn how to:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Use &lt;code&gt;requests&lt;/code&gt; and Beautiful Soup for &lt;strong&gt;scraping and parsing data&lt;/strong&gt; from the Web&lt;/li&gt;
&lt;li&gt;Walk through a &lt;strong&gt;web scraping pipeline&lt;/strong&gt; from start to finish&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Build a script&lt;/strong&gt; that fetches job offers from the Web and displays relevant information in your console&lt;/li&gt;
&lt;/ul&gt;
        &lt;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 ggplot in Python: Visualizing Data With plotnine</title>
      <id>https://realpython.com/ggplot-python/</id>
      <link href="https://realpython.com/ggplot-python/"/>
      <updated>2020-10-12T14:00:00+00:00</updated>
      <summary>In this tutorial, you&#x27;ll learn how to use ggplot in Python to build data visualizations with plotnine. You&#x27;ll discover what a grammar of graphics is and how it can help you create plots in a very concise and consistent way.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;In this tutorial, you’ll learn how to use &lt;code&gt;ggplot&lt;/code&gt; in Python to create data visualizations using a &lt;strong&gt;grammar of graphics&lt;/strong&gt;. A grammar of graphics is a high-level tool that allows you to create data plots in an efficient and consistent way. It abstracts most low-level details, letting you focus on creating meaningful and beautiful visualizations for your data. &lt;/p&gt;
&lt;p&gt;There are several Python packages that provide a grammar of graphics. This tutorial focuses on &lt;strong&gt;plotnine&lt;/strong&gt; since it’s one of the most mature ones. plotnine is based on &lt;a href=&quot;https://ggplot2.tidyverse.org/&quot;&gt;&lt;code&gt;ggplot2&lt;/code&gt;&lt;/a&gt; from the R programming language, so if you have a background in R, then you can consider plotnine as the equivalent of &lt;code&gt;ggplot2&lt;/code&gt; in Python.&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 &lt;strong&gt;plotnine&lt;/strong&gt; and &lt;strong&gt;Jupyter Notebook&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Combine the different elements of the &lt;strong&gt;grammar of graphics&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Use plotnine to &lt;strong&gt;create visualizations&lt;/strong&gt; in an efficient and consistent way&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Export&lt;/strong&gt; your data visualizations to files&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This tutorial assumes that you already have &lt;a href=&quot;https://realpython.com/products/python-basics-book/&quot;&gt;some experience in Python&lt;/a&gt; and at least some knowledge of &lt;strong&gt;Jupyter Notebook&lt;/strong&gt; and &lt;strong&gt;pandas&lt;/strong&gt;. To get up to speed on these topics, check out &lt;a href=&quot;https://realpython.com/jupyter-notebook-introduction/&quot;&gt;Jupyter Notebook: An Introduction&lt;/a&gt; and &lt;a href=&quot;https://realpython.com/pandas-python-explore-dataset/&quot;&gt;Using Pandas and Python to Explore Your Dataset&lt;/a&gt;.&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;&lt;p&gt;&lt;strong&gt;Free Download:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/python-tricks-sample-pdf/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-python-tricks-sample-pdf&quot; data-focus=&quot;false&quot;&gt;Get a sample chapter from Python Tricks: The Book&lt;/a&gt; that shows you Python&#x27;s best practices with simple examples you can apply instantly to write more beautiful + Pythonic code.&lt;/p&gt;&lt;/div&gt;

&lt;h2 id=&quot;setting-up-your-environment&quot;&gt;Setting Up Your Environment&lt;a class=&quot;headerlink&quot; href=&quot;#setting-up-your-environment&quot; title=&quot;Permanent link&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;In this section, you’ll learn how to set up your environment. You’ll cover the following topics:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Creating a virtual environment&lt;/li&gt;
&lt;li&gt;Installing plotnine&lt;/li&gt;
&lt;li&gt;Installing Juptyer Notebook&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Virtual environments&lt;/strong&gt; enable you to install packages in isolated environments. They’re very useful when you want to try some packages or projects without messing with your system-wide installation. You can learn more about them in &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;Run the following commands to create a directory named &lt;code&gt;data-visualization&lt;/code&gt; and a virtual environment inside 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; mkdir data-visualization
&lt;span class=&quot;gp&quot;&gt;$&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;cd&lt;/span&gt; data-visualization
&lt;span class=&quot;gp&quot;&gt;$&lt;/span&gt; python3 -m venv venv
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;After running the above commands, you’ll find your virtual environment inside the &lt;code&gt;data-visualization&lt;/code&gt; directory. Run the following command to activate the virtual environment and start using 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; &lt;span class=&quot;nb&quot;&gt;source&lt;/span&gt; ./venv/bin/activate
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;When you activate a virtual environment, any package that you install will be installed inside the environment without affecting your system-wide installation.&lt;/p&gt;
&lt;p&gt;Next, you’ll install plotnine inside the virtual environment using the &lt;a href=&quot;https://realpython.com/what-is-pip/&quot;&gt;&lt;code&gt;pip&lt;/code&gt; package installer&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Install plotnine by running this 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; pip install plotnine
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Executing the above command makes the &lt;code&gt;plotnine&lt;/code&gt; package available in your virtual environment.&lt;/p&gt;
&lt;p&gt;Finally, you’ll install Jupyter Notebook. While this isn’t strictly necessary for using plotnine, you’ll find Jupyter Notebook really useful when working with data and building visualizations. If you’ve never used the program before, then you can learn more about it in &lt;a href=&quot;https://realpython.com/jupyter-notebook-introduction/&quot;&gt;Jupyter Notebook: An Introduction&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;To install Jupyter Notebook, use 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; pip install jupyter
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Congratulations, you now have a virtual environment with plotnine and Jupyter Notebook installed! With this setup, you’ll be able to run all the code samples presented through this tutorial.&lt;/p&gt;
&lt;h2 id=&quot;building-your-first-plot-with-ggplot-and-python&quot;&gt;Building Your First Plot With &lt;code&gt;ggplot&lt;/code&gt; and Python&lt;a class=&quot;headerlink&quot; href=&quot;#building-your-first-plot-with-ggplot-and-python&quot; title=&quot;Permanent link&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;In this section, you’ll learn how to build your first data visualization using &lt;code&gt;ggplot&lt;/code&gt; in Python. You’ll also learn how to inspect and use the example datasets included with plotnine.&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/ggplot-python/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/ggplot-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 #30: Exploring the New Features of Python 3.9</title>
      <id>https://realpython.com/podcasts/rpp/30/</id>
      <link href="https://realpython.com/podcasts/rpp/30/"/>
      <updated>2020-10-09T12:00:00+00:00</updated>
      <summary>Python 3.9 has arrived! This week on the show, former guest and Real Python author Geir Arne Hjelle returns to talk about his recent article, &quot;Python 3.9: Cool New Features for You to Try&quot;. Also joining the conversation is Real Python video course instructor and author Christopher Trudeau. Christopher has created a video course, which was released this week also, based on Geir Arne&#x27;s article. We talk about time zones, merging dictionaries, the new parser, type hints, and more.</summary>
      <content type="html">
        &lt;p&gt;Python 3.9 has arrived! This week on the show, former guest and Real Python author Geir Arne Hjelle returns to talk about his recent article, &quot;Python 3.9: Cool New Features for You to Try&quot;. Also joining the conversation is Real Python video course instructor and author Christopher Trudeau. Christopher has created a video course, which was released this week also, based on Geir Arne&#x27;s article. We talk about time zones, merging dictionaries, the new parser, type hints, and more.&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 Community Interview With Anthony Shaw</title>
      <id>https://realpython.com/interview-anthony-shaw/</id>
      <link href="https://realpython.com/interview-anthony-shaw/"/>
      <updated>2020-10-07T14:00:00+00:00</updated>
      <summary>In this interview, we talk with Anthony Shaw, global senior vice president for talent transformation and innovation at NTT Ltd. We discuss a variety of topics, including Python security, advice for beginner developers, his love for the beach, and his new book, CPython Internals.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Today I’m joined by &lt;a href=&quot;https://twitter.com/anthonypjshaw&quot;&gt;Anthony Shaw&lt;/a&gt;, global senior vice president for talent transformation and innovation at &lt;a href=&quot;https://hello.global.ntt/&quot;&gt;NTT Ltd&lt;/a&gt;. Anthony is also a &lt;em&gt;Real Python&lt;/em&gt; &lt;a href=&quot;https://realpython.com/team/ashaw/&quot;&gt;tutorial author&lt;/a&gt; and has written a new book titled &lt;a href=&quot;https://realpython.com/products/cpython-internals-book/&quot;&gt;&lt;em&gt;CPython Internals&lt;/em&gt;&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;In this interview, we discuss a variety of topics, including Python security, advice for beginner developers, and his love for the beach. So without further ado, let’s welcome Anthony.&lt;/p&gt;
&lt;p class=&quot;mt-5&quot;&gt;&lt;strong&gt;Ricky:&lt;/strong&gt; &lt;em&gt;Thanks for joining me, Anthony. I’m glad you could join me for this interview. I’d like to start in the same manner we do with all our guests: how did you get into programming, and when did you start using Python?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;img loading=&quot;lazy&quot; class=&quot;img-fluid w-25 float-right ml-3 rounded-circle&quot; src=&quot;https://files.realpython.com/media/10995490_10152772557676353_1442757472697890998_n.e88e3d7b17c7.jpg&quot; width=&quot;551&quot; height=&quot;551&quot; srcset=&quot;https://robocrop.realpython.net/?url=https%3A//files.realpython.com/media/10995490_10152772557676353_1442757472697890998_n.e88e3d7b17c7.jpg&amp;amp;w=137&amp;amp;sig=fc50fa3228501b53232b43463b244b8a3a8a6261 137w, https://robocrop.realpython.net/?url=https%3A//files.realpython.com/media/10995490_10152772557676353_1442757472697890998_n.e88e3d7b17c7.jpg&amp;amp;w=275&amp;amp;sig=6cda05a52506f400a80e5d30890a69eead859df5 275w, https://files.realpython.com/media/10995490_10152772557676353_1442757472697890998_n.e88e3d7b17c7.jpg 551w&quot; sizes=&quot;75vw&quot; alt=&quot;Anthony Shaw&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Anthony:&lt;/strong&gt; Hey, Ricky. Thanks for the opportunity to speak to the &lt;em&gt;Real Python&lt;/em&gt; readers!&lt;/p&gt;
&lt;p&gt;I got into programming in the early ’90s, learning how to write code for devices that were little more than programmable calculators. As a teen, I spent most of my income from a paper round on programming books and computer hardware.&lt;/p&gt;
&lt;p&gt;I’m mostly self-taught, starting on some older BASIC-type languages and moving on to OOP languages like C++ and C#. I’d been working with C# .NET for about eight years and discovered Python while contributing to an open source project that needed support for an API I worked on at work.&lt;/p&gt;
&lt;p&gt;I learned the basics of Python over a long weekend in 2010 and fell for the language’s flexibility in working with fluid data structures and natural way of using both object-oriented programming and procedural programming.&lt;/p&gt;
&lt;p class=&quot;mt-5&quot;&gt;&lt;strong&gt;Ricky:&lt;/strong&gt; &lt;em&gt;You seem to have gained an interest in Python security lately, having written a &lt;a href=&quot;https://github.com/tonybaloney/pycharm-security&quot;&gt;PyCharm security plugin&lt;/a&gt; and a &lt;a href=&quot;https://github.com/tonybaloney/django-xss-fuzzer&quot;&gt;cross-site scripting library for Django&lt;/a&gt;. You even made a video on &lt;a href=&quot;https://www.youtube.com/watch?v=IVHX9jDrI0o&quot;&gt;SQL injection&lt;/a&gt;. How are you finding your foray into infosec, and is this a permanent change of focus for you in your career?&lt;/em&gt;&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/interview-anthony-shaw/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/interview-anthony-shaw/ »&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>Cool New Features in Python 3.9</title>
      <id>https://realpython.com/courses/cool-new-features-python-39/</id>
      <link href="https://realpython.com/courses/cool-new-features-python-39/"/>
      <updated>2020-10-06T14:00:00+00:00</updated>
      <summary>In this course, you&#x27;ll explore some of the coolest and most useful features in the newly released Python 3.9. You&#x27;ll learn how Python 3.9 makes it easier to work with time zones, dictionaries, decorators, and several other techniques that will make your code cleaner and more efficient.</summary>
      <content type="html">
        &lt;p&gt;Python 3.9 is here! Volunteers from all over the world have been working on improvements to Python for the past year. While beta versions have been available for some time, the first official version of Python 3.9 was released on &lt;a href=&quot;https://www.python.org/dev/peps/pep-0596/&quot;&gt;October 5, 2020&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Every release of Python includes new, improved, and deprecated features, and Python 3.9 is no different. The &lt;a href=&quot;https://docs.python.org/3.9/whatsnew/3.9.html&quot;&gt;documentation&lt;/a&gt; gives a complete list of the changes. Below, you&amp;rsquo;ll take an in-depth look at the coolest features that the latest version of Python brings to the table.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this course, you&amp;rsquo;ll learn about:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Accessing and calculating with &lt;strong&gt;time zones&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Merging and updating &lt;strong&gt;dictionaries&lt;/strong&gt; effectively&lt;/li&gt;
&lt;li&gt;Using &lt;strong&gt;decorators&lt;/strong&gt; based on &lt;strong&gt;expressions&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Combining &lt;strong&gt;type hints&lt;/strong&gt; and &lt;strong&gt;other annotations&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Python 3.9: Cool New Features for You to Try</title>
      <id>https://realpython.com/python39-new-features/</id>
      <link href="https://realpython.com/python39-new-features/"/>
      <updated>2020-10-05T17:18:24+00:00</updated>
      <summary>In this tutorial, you&#x27;ll explore some of the coolest and most useful features in the newly released Python 3.9. You&#x27;ll learn how Python 3.9 makes it easier to work with time zones, dictionaries, decorators, and several other techniques that will make your code cleaner and more efficient.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;&lt;a href=&quot;https://www.python.org/downloads/release/python-390/&quot;&gt;Python 3.9 is here!&lt;/a&gt; Volunteers from all over the world have been working on improvements to Python for the past year. While beta versions have been available for some time, the first official version of Python 3.9 was released on &lt;a href=&quot;https://www.python.org/dev/peps/pep-0596/&quot;&gt;October 5, 2020&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Every release of Python includes new, improved, and deprecated features, and Python 3.9 is no different. The &lt;a href=&quot;https://docs.python.org/3.9/whatsnew/3.9.html&quot;&gt;documentation&lt;/a&gt; gives a complete list of the changes. Below, you’ll take an in-depth look at the coolest features that the latest version of Python brings to the table.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this tutorial, you’ll learn about:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Accessing and calculating with &lt;strong&gt;time zones&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Merging and updating &lt;strong&gt;dictionaries&lt;/strong&gt; effectively&lt;/li&gt;
&lt;li&gt;Using &lt;strong&gt;decorators&lt;/strong&gt; based on &lt;strong&gt;expressions&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Combining &lt;strong&gt;type hints&lt;/strong&gt; and &lt;strong&gt;other annotations&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To try out the new features yourself, you need to have Python 3.9 installed. You can download and install it from the &lt;a href=&quot;https://www.python.org/download/pre-releases/&quot;&gt;Python home page&lt;/a&gt;. Alternatively, you can try it out using the &lt;a href=&quot;https://hub.docker.com/_/python/&quot;&gt;official Docker image&lt;/a&gt;. See &lt;a href=&quot;https://realpython.com/python-versions-docker/&quot;&gt;Run Python Versions in Docker: How to Try the Latest Python Release&lt;/a&gt; for more details.&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;&lt;p&gt;&lt;strong&gt;Free Bonus:&lt;/strong&gt; &lt;a href=&quot;&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-power-of-decorators-fixed&quot; data-focus=&quot;false&quot;&gt;Click here to get access to a free &quot;The Power of Python Decorators&quot; guide&lt;/a&gt; that shows you 3 advanced decorator patterns and techniques you can use to write to cleaner and more Pythonic programs.&lt;/p&gt;&lt;/div&gt;

&lt;h2 id=&quot;proper-time-zone-support&quot;&gt;Proper Time Zone Support&lt;a class=&quot;headerlink&quot; href=&quot;#proper-time-zone-support&quot; title=&quot;Permanent link&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Python has extensive support for working with dates and times through the &lt;a href=&quot;https://realpython.com/python-datetime/&quot;&gt;&lt;code&gt;datetime&lt;/code&gt;&lt;/a&gt; module in the standard library. However, support for working with time zones has been somewhat lacking. Until now, the &lt;a href=&quot;https://realpython.com/python-datetime/#working-with-time-zones&quot;&gt;recommended way&lt;/a&gt; of working with time zones has been to use third-party libraries like &lt;a href=&quot;https://dateutil.readthedocs.io/en/stable/&quot;&gt;&lt;code&gt;dateutil&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The biggest challenge to working with time zones in plain Python has been that you’ve had to implement time zones rules yourself. A &lt;code&gt;datetime&lt;/code&gt; supports setting time zones, but only &lt;a href=&quot;https://en.wikipedia.org/wiki/Coordinated_Universal_Time&quot;&gt;UTC&lt;/a&gt; is immediately available. Other time zones need to be implemented on top of the abstract &lt;a href=&quot;https://docs.python.org/3/library/datetime.html#tzinfo-objects&quot;&gt;&lt;code&gt;tzinfo&lt;/code&gt;&lt;/a&gt; base class.&lt;/p&gt;
&lt;h3 id=&quot;accessing-time-zones&quot;&gt;Accessing Time Zones&lt;a class=&quot;headerlink&quot; href=&quot;#accessing-time-zones&quot; title=&quot;Permanent link&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;You can get a &lt;a href=&quot;https://blog.ganssle.io/articles/2019/11/utcnow.html&quot;&gt;UTC time stamp&lt;/a&gt; from the &lt;code&gt;datetime&lt;/code&gt; library 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;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;datetime&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;datetime&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;timezone&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;datetime&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;now&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;tz&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;timezone&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;utc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;datetime.datetime(2020, 9, 8, 15, 4, 15, 361413, tzinfo=datetime.timezone.utc)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Note that the resulting time stamp is &lt;strong&gt;time zone aware&lt;/strong&gt;. It has an attached time zone as specified by &lt;code&gt;tzinfo&lt;/code&gt;. Time stamps without any time zone information are called &lt;strong&gt;naive&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.ganssle.io/&quot;&gt;Paul Ganssle&lt;/a&gt; has been the maintainer of &lt;code&gt;dateutil&lt;/code&gt; for years. He joined the Python core developers in 2019 and helped add a new &lt;a href=&quot;https://docs.python.org/3.9/library/zoneinfo.html&quot;&gt;&lt;code&gt;zoneinfo&lt;/code&gt;&lt;/a&gt; standard library that makes working with time zones much more convenient.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;zoneinfo&lt;/code&gt; provides access to the Internet Assigned Numbers Authority (IANA) &lt;a href=&quot;https://www.iana.org/time-zones&quot;&gt;Time Zone Database&lt;/a&gt;. The IANA &lt;a href=&quot;http://mm.icann.org/pipermail/tz-announce/&quot;&gt;updates its database&lt;/a&gt; several times each year, and it’s the most authoritative source for time zone information.&lt;/p&gt;
&lt;p&gt;Using &lt;code&gt;zoneinfo&lt;/code&gt;, you can get an object describing any time zone in the database:&lt;/p&gt;
&lt;div class=&quot;highlight python repl&quot;&gt;&lt;span class=&quot;repl-toggle&quot; title=&quot;Toggle REPL prompts and output&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;zoneinfo&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ZoneInfo&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;ZoneInfo&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;America/Vancouver&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;zoneinfo.ZoneInfo(key=&#x27;America/Vancouver&#x27;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;You access a time zone using one of several keys. In this case, you use &lt;code&gt;&quot;America/Vancouver&quot;&lt;/code&gt;.&lt;/p&gt;
&lt;div class=&quot;alert alert-primary&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; &lt;code&gt;zoneinfo&lt;/code&gt; uses an IANA time zone database residing on your local computer. It’s possible—on Windows in particular—that you don’t have any such database or that &lt;code&gt;zoneinfo&lt;/code&gt; won’t be able to locate it. If you get an error like the following, then &lt;code&gt;zoneinfo&lt;/code&gt; hasn’t been able to locate a time zone database:&lt;/p&gt;
&lt;div class=&quot;highlight python repl&quot;&gt;&lt;span class=&quot;repl-toggle&quot; title=&quot;Toggle REPL prompts and output&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;zoneinfo&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ZoneInfo&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;ZoneInfo&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;America/Vancouver&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;gt&quot;&gt;Traceback (most recent call last):&lt;/span&gt;
  File &lt;span class=&quot;nb&quot;&gt;&quot;&amp;lt;stdin&amp;gt;&quot;&lt;/span&gt;, line &lt;span class=&quot;m&quot;&gt;1&lt;/span&gt;, in &lt;span class=&quot;n&quot;&gt;&amp;lt;module&amp;gt;&lt;/span&gt;
&lt;span class=&quot;gr&quot;&gt;ZoneInfoNotFoundError&lt;/span&gt;: &lt;span class=&quot;n&quot;&gt;&#x27;No time zone found with key America/Vancouver&#x27;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;A Python implementation of the IANA Time Zone Database is available on &lt;a href=&quot;https://pypi.org/project/tzdata/&quot;&gt;PyPI&lt;/a&gt; as &lt;a href=&quot;https://tzdata.readthedocs.io/&quot;&gt;&lt;code&gt;tzdata&lt;/code&gt;&lt;/a&gt;. You can install it with &lt;a href=&quot;https://realpython.com/what-is-pip/&quot;&gt;&lt;code&gt;pip&lt;/code&gt;&lt;/a&gt;:&lt;/p&gt;
&lt;div class=&quot;highlight sh&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;$&lt;/span&gt; python -m pip install tzdata
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Once &lt;code&gt;tzdata&lt;/code&gt; is installed, &lt;code&gt;zoneinfo&lt;/code&gt; should be able to read information about all supported time zones. &lt;code&gt;tzdata&lt;/code&gt; is maintained by the Python core team. Note that you need to keep the package updated in order to have access to the latest changes in the IANA Time Zone Database.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;You can make time zone–aware time stamps using the &lt;code&gt;tz&lt;/code&gt; or &lt;code&gt;tzinfo&lt;/code&gt; arguments to &lt;code&gt;datetime&lt;/code&gt; functions:&lt;/p&gt;
&lt;div class=&quot;highlight python repl&quot;&gt;&lt;span class=&quot;repl-toggle&quot; title=&quot;Toggle REPL prompts and output&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;datetime&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;datetime&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;zoneinfo&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ZoneInfo&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;datetime&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;now&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;tz&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ZoneInfo&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Europe/Oslo&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;datetime.datetime(2020, 9, 8, 17, 12, 0, 939001,&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;                  tzinfo=zoneinfo.ZoneInfo(key=&#x27;Europe/Oslo&#x27;))&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;datetime&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2020&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;10&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;3&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;n&quot;&gt;tzinfo&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ZoneInfo&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;America/Vancouver&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;datetime.datetime(2020, 10, 5, 3, 9,&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;                  tzinfo=zoneinfo.ZoneInfo(key=&#x27;America/Vancouver&#x27;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Having the time zone recorded with the time stamp is great for record keeping. It also makes it convenient to convert between time zones:&lt;/p&gt;
&lt;div class=&quot;highlight python repl&quot;&gt;&lt;span class=&quot;repl-toggle&quot; title=&quot;Toggle REPL prompts and output&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;datetime&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;datetime&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;zoneinfo&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ZoneInfo&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;release&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;datetime&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2020&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;10&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;3&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;n&quot;&gt;tzinfo&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ZoneInfo&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;America/Vancouver&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;release&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;astimezone&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ZoneInfo&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Europe/Oslo&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;datetime.datetime(2020, 10, 5, 12, 9,&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;                  tzinfo=zoneinfo.ZoneInfo(key=&#x27;Europe/Oslo&#x27;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Note that the time in Oslo is nine hours later than in Vancouver.&lt;/p&gt;
&lt;h3 id=&quot;investigating-time-zones&quot;&gt;Investigating Time Zones&lt;a class=&quot;headerlink&quot; href=&quot;#investigating-time-zones&quot; title=&quot;Permanent link&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python39-new-features/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python39-new-features/ »&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 #29: Resolving Package Dependencies With the New Version of Pip</title>
      <id>https://realpython.com/podcasts/rpp/29/</id>
      <link href="https://realpython.com/podcasts/rpp/29/"/>
      <updated>2020-10-02T12:00:00+00:00</updated>
      <summary>If you use Python, then you probably have used pip to install additional packages from the Python package index. Part of the magic behind pip is the dependency resolver, and there is a new version of it in the latest version of pip. This week on the show, we have Sumana Harihareswara and Georgia Bullen, who have been working on the recent releases of pip. Sumana is the project manager for pip, and Georgia has been working on pip&#x27;s user experience (UX).</summary>
      <content type="html">
        &lt;p&gt;If you use Python, then you probably have used pip to install additional packages from the Python package index. Part of the magic behind pip is the dependency resolver, and there is a new version of it in the latest version of pip. This week on the show, we have Sumana Harihareswara and Georgia Bullen, who have been working on the recent releases of pip. Sumana is the project manager for pip, and Georgia has been working on pip&#x27;s user experience (UX).&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 map(): Processing Iterables Without a Loop</title>
      <id>https://realpython.com/python-map-function/</id>
      <link href="https://realpython.com/python-map-function/"/>
      <updated>2020-09-30T14:00:00+00:00</updated>
      <summary>In this step-by-step tutorial, you&#x27;ll learn how Python&#x27;s map() works and how to use it effectively in your programs. You&#x27;ll also learn how to use list comprehension and generator expressions to replace map() in a Pythonic and efficient way.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Python’s &lt;strong&gt;&lt;a href=&quot;https://docs.python.org/3/library/functions.html#map&quot;&gt;&lt;code&gt;map()&lt;/code&gt;&lt;/a&gt;&lt;/strong&gt; is a built-in function that allows you to process and transform all the items in an iterable without using an explicit &lt;a href=&quot;https://realpython.com/courses/python-for-loop/&quot;&gt;&lt;code&gt;for&lt;/code&gt; loop&lt;/a&gt;, a technique commonly known as &lt;a href=&quot;https://en.wikipedia.org/wiki/Map_(higher-order_function)&quot;&gt;mapping&lt;/a&gt;. &lt;code&gt;map()&lt;/code&gt; is useful when you need to apply a &lt;strong&gt;transformation function&lt;/strong&gt; to each item in an iterable and transform them into a new iterable. &lt;code&gt;map()&lt;/code&gt; is one of the tools that support a &lt;a href=&quot;https://realpython.com/courses/functional-programming-python/&quot;&gt;functional programming style&lt;/a&gt; in Python.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this tutorial, you’ll learn:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;How Python’s &lt;strong&gt;&lt;code&gt;map()&lt;/code&gt;&lt;/strong&gt; works&lt;/li&gt;
&lt;li&gt;How to &lt;strong&gt;transform&lt;/strong&gt; different types of Python iterables using &lt;code&gt;map()&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;How to &lt;strong&gt;combine&lt;/strong&gt; &lt;code&gt;map()&lt;/code&gt; with other functional tools to perform more complex transformations&lt;/li&gt;
&lt;li&gt;What tools you can use to &lt;strong&gt;replace&lt;/strong&gt; &lt;code&gt;map()&lt;/code&gt; and make your code more &lt;strong&gt;Pythonic&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;With this knowledge, you’ll be able to use &lt;code&gt;map()&lt;/code&gt; effectively in your programs or, alternatively, to use &lt;a href=&quot;https://realpython.com/list-comprehension-python/&quot;&gt;list comprehensions&lt;/a&gt; or &lt;a href=&quot;https://realpython.com/introduction-to-python-generators/#building-generators-with-generator-expressions&quot;&gt;generator expressions&lt;/a&gt; to make your code more Pythonic and readable.&lt;/p&gt;
&lt;p&gt;For a better understanding of &lt;code&gt;map()&lt;/code&gt;, some previous knowledge of how to work with &lt;a href=&quot;https://docs.python.org/3/glossary.html#term-iterable&quot;&gt;iterables&lt;/a&gt;, &lt;code&gt;for&lt;/code&gt; loops, &lt;a href=&quot;https://realpython.com/defining-your-own-python-function/&quot;&gt;functions&lt;/a&gt;, and &lt;a href=&quot;https://realpython.com/python-lambda/&quot;&gt;&lt;code&gt;lambda&lt;/code&gt; functions&lt;/a&gt; would be helpful.&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;&lt;p&gt;&lt;strong&gt;Free Bonus:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/python-mastery-course/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-python-mastery-course&quot; data-focus=&quot;false&quot;&gt;5 Thoughts On Python Mastery&lt;/a&gt;, a free course for Python developers that shows you the roadmap and the mindset you&#x27;ll need to take your Python skills to the next level.&lt;/p&gt;&lt;/div&gt;

&lt;h2 id=&quot;coding-with-functional-style-in-python&quot;&gt;Coding With Functional Style in Python&lt;a class=&quot;headerlink&quot; href=&quot;#coding-with-functional-style-in-python&quot; title=&quot;Permanent link&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;In &lt;a href=&quot;https://realpython.com/courses/functional-programming-python/&quot;&gt;&lt;strong&gt;functional programming&lt;/strong&gt;&lt;/a&gt;, computations are done by combining functions that take arguments and return a concrete value (or values) as a result. These functions don’t modify their input arguments and don’t change the program’s state. They just provide the result of a given computation. These kinds of functions are commonly known as &lt;a href=&quot;https://en.wikipedia.org/wiki/Pure_function&quot;&gt;pure functions&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In theory, programs that are built using a functional style will be easier to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Develop&lt;/strong&gt; because you can code and use every function in isolation&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Debug and test&lt;/strong&gt; because you can &lt;a href=&quot;https://realpython.com/python-testing/&quot;&gt;test&lt;/a&gt; and &lt;a href=&quot;https://realpython.com/courses/python-debugging-pdb/&quot;&gt;debug&lt;/a&gt; individual functions without looking at the rest of the program&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Understand&lt;/strong&gt; because you don’t need to deal with state changes throughout the program&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Functional programming typically uses &lt;a href=&quot;https://realpython.com/python-lists-tuples/&quot;&gt;lists&lt;/a&gt;, arrays, and other iterables to represent the data along with a set of functions that operate on that data and transform it. When it comes to processing data with a functional style, there are at least three commonly used techniques:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Map_(higher-order_function)&quot;&gt;&lt;strong&gt;Mapping&lt;/strong&gt;&lt;/a&gt; consists of applying a transformation function to an iterable to produce a new iterable. Items in the new iterable are produced by calling the transformation function on each item in the original iterable.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Filter_(higher-order_function)&quot;&gt;&lt;strong&gt;Filtering&lt;/strong&gt;&lt;/a&gt; consists of applying a &lt;a href=&quot;https://en.wikipedia.org/wiki/Boolean-valued_function&quot;&gt;predicate or Boolean-valued function&lt;/a&gt; to an iterable to generate a new iterable. Items in the new iterable are produced by filtering out any items in the original iterable that make the predicate function return false.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Fold_(higher-order_function)&quot;&gt;&lt;strong&gt;Reducing&lt;/strong&gt;&lt;/a&gt; consists of applying a reduction function to an iterable to produce a single cumulative value.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;According to &lt;a href=&quot;https://en.wikipedia.org/wiki/Guido_van_Rossum&quot;&gt;Guido van Rossum&lt;/a&gt;, Python is more strongly influenced by &lt;a href=&quot;https://en.wikipedia.org/wiki/Imperative_programming&quot;&gt;imperative&lt;/a&gt; programming languages than functional languages:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I have never considered Python to be heavily influenced by functional languages, no matter what people say or think. I was much more familiar with imperative languages such as C and Algol 68 and although I had made functions first-class objects, I didn’t view Python as a functional programming language. (&lt;a href=&quot;https://web.archive.org/web/20161104183819/http://python-history.blogspot.com.br/2009/04/origins-of-pythons-functional-features.html&quot;&gt;Source&lt;/a&gt;)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;However, back in 1993, the Python community was demanding some functional programming features. They were asking for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Anonymous_function&quot;&gt;Anonymous functions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;A &lt;code&gt;map()&lt;/code&gt; function&lt;/li&gt;
&lt;li&gt;A &lt;code&gt;filter()&lt;/code&gt; function&lt;/li&gt;
&lt;li&gt;A &lt;code&gt;reduce()&lt;/code&gt; function&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These functional features were added to the language thanks to the &lt;a href=&quot;https://web.archive.org/web/20200709210752/http://www.artima.com/weblogs/viewpost.jsp?thread=98196&quot;&gt;contribution of a community member&lt;/a&gt;. Nowadays, &lt;a href=&quot;https://docs.python.org/3/library/functions.html#map&quot;&gt;&lt;code&gt;map()&lt;/code&gt;&lt;/a&gt;, &lt;a href=&quot;https://docs.python.org/3/library/functions.html#filter&quot;&gt;&lt;code&gt;filter()&lt;/code&gt;&lt;/a&gt;, and &lt;a href=&quot;https://realpython.com/python-reduce-function/&quot;&gt;&lt;code&gt;reduce()&lt;/code&gt;&lt;/a&gt; are fundamental components of the functional programming style in Python.&lt;/p&gt;
&lt;p&gt;In this tutorial, you’ll cover one of these functional features, the built-in function &lt;code&gt;map()&lt;/code&gt;. You’ll also learn how to use &lt;a href=&quot;https://realpython.com/list-comprehension-python/&quot;&gt;list comprehensions&lt;/a&gt; and &lt;a href=&quot;https://realpython.com/introduction-to-python-generators/#building-generators-with-generator-expressions&quot;&gt;generator expressions&lt;/a&gt; to get the same functionality of &lt;code&gt;map()&lt;/code&gt; in a Pythonic and readable way.&lt;/p&gt;
&lt;h2 id=&quot;getting-started-with-pythons-map&quot;&gt;Getting Started With Python’s &lt;code&gt;map()&lt;/code&gt;&lt;a class=&quot;headerlink&quot; href=&quot;#getting-started-with-pythons-map&quot; title=&quot;Permanent link&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Sometimes you might face situations in which you need to perform the same operation on all the items of an input iterable to build a new iterable. The quickest and most common approach to this problem is to use a &lt;a href=&quot;https://realpython.com/courses/python-for-loop/&quot;&gt;Python &lt;code&gt;for&lt;/code&gt; loop&lt;/a&gt;. However, you can also tackle this problem without an explicit loop by using &lt;code&gt;map()&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;In the following three sections, you’ll learn how &lt;code&gt;map()&lt;/code&gt; works and how you can use it to process and transform iterables without a loop.&lt;/p&gt;
&lt;h3 id=&quot;understanding-map&quot;&gt;Understanding &lt;code&gt;map()&lt;/code&gt;&lt;a class=&quot;headerlink&quot; href=&quot;#understanding-map&quot; title=&quot;Permanent link&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;map()&lt;/code&gt; loops over the items of an input iterable (or iterables) and returns an iterator that results from applying a transformation function to every item in the original input iterable.&lt;/p&gt;
&lt;p&gt;According to the &lt;a href=&quot;https://docs.python.org/3/library/functions.html#map&quot;&gt;documentation&lt;/a&gt;, &lt;code&gt;map()&lt;/code&gt; takes a function object and an iterable (or multiple iterables) as arguments and returns an iterator that yields transformed items on demand. The function’s signature is defined as follows:&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;nb&quot;&gt;map&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;function&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;n&quot;&gt;iterable1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;iterable2&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;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;iterableN&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python-map-function/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-map-function/ »&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 Google Login With Flask</title>
      <id>https://realpython.com/courses/using-google-login-flask/</id>
      <link href="https://realpython.com/courses/using-google-login-flask/"/>
      <updated>2020-09-29T14:00:00+00:00</updated>
      <summary>In this course, you&#x27;ll create a Flask application that lets users sign in using their Google login. You&#x27;ll learn about OAuth 2 and OpenID Connect and also find out how to implement some code to handle user session management.</summary>
      <content type="html">
        &lt;p&gt;In this course, you&amp;rsquo;ll work through the creation of a &lt;a href=&quot;https://realpython.com/tutorials/flask/&quot;&gt;Flask&lt;/a&gt; web application. Your application will allow a user to log in using their Google identity instead of creating a new account. There are tons of benefits with this method of user management. It&amp;rsquo;s going to be safer and simpler than managing the traditional username and password combinations.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;By the end of this course, you&amp;rsquo;ll be able to:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Create a &lt;strong&gt;Flask web application&lt;/strong&gt; that lets users log in with Google&lt;/li&gt;
&lt;li&gt;Create &lt;strong&gt;client credentials&lt;/strong&gt; to interact with Google&lt;/li&gt;
&lt;li&gt;Use &lt;strong&gt;Flask-Login&lt;/strong&gt; for user session management in a Flask application&lt;/li&gt;
&lt;li&gt;Better understand &lt;strong&gt;OAuth 2 and OpenID Connect&lt;/strong&gt; (OIDC)&lt;/li&gt;
&lt;/ul&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Python return Statement: Usage and Best Practices</title>
      <id>https://realpython.com/python-return-statement/</id>
      <link href="https://realpython.com/python-return-statement/"/>
      <updated>2020-09-28T14:00:00+00:00</updated>
      <summary>In this step-by-step tutorial, you&#x27;ll learn how to use the Python return statement when writing functions. Additionally, you&#x27;ll cover some good programming practices related to the use of return. With this knowledge, you&#x27;ll be able to write readable, robust, and maintainable functions in Python.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;The Python &lt;a href=&quot;https://en.wikipedia.org/wiki/Return_statement&quot;&gt;&lt;code&gt;return&lt;/code&gt; statement&lt;/a&gt; is a key component of &lt;a href=&quot;https://realpython.com/defining-your-own-python-function/&quot;&gt;functions&lt;/a&gt; and &lt;a href=&quot;https://realpython.com/python3-object-oriented-programming/#instance-methods&quot;&gt;methods&lt;/a&gt;. You can use the &lt;code&gt;return&lt;/code&gt; statement to make your functions send Python objects back to the caller code. These objects are known as the function’s &lt;strong&gt;return value&lt;/strong&gt;. You can use them to perform further computation in your programs.&lt;/p&gt;
&lt;p&gt;Using the &lt;code&gt;return&lt;/code&gt; statement effectively is a core skill if you want to code custom functions that are &lt;a href=&quot;https://realpython.com/learning-paths/writing-pythonic-code/&quot;&gt;Pythonic&lt;/a&gt; and robust.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this tutorial, you’ll learn:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;How to use the &lt;strong&gt;Python &lt;code&gt;return&lt;/code&gt; statement&lt;/strong&gt; in your functions&lt;/li&gt;
&lt;li&gt;How to return &lt;strong&gt;single&lt;/strong&gt; or &lt;strong&gt;multiple values&lt;/strong&gt; from your functions&lt;/li&gt;
&lt;li&gt;What &lt;strong&gt;best practices&lt;/strong&gt; to observe when using &lt;code&gt;return&lt;/code&gt; statements&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;With this knowledge, you’ll be able to write more readable, maintainable, and concise functions in Python. If you’re totally new to Python functions, then you can check out &lt;a href=&quot;https://realpython.com/defining-your-own-python-function/&quot;&gt;Defining Your Own Python Function&lt;/a&gt; before diving into this tutorial.&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;&lt;p&gt;&lt;strong&gt;Free Bonus:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/python-mastery-course/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-python-mastery-course&quot; data-focus=&quot;false&quot;&gt;5 Thoughts On Python Mastery&lt;/a&gt;, a free course for Python developers that shows you the roadmap and the mindset you&#x27;ll need to take your Python skills to the next level.&lt;/p&gt;&lt;/div&gt;

&lt;h2 id=&quot;getting-started-with-python-functions&quot;&gt;Getting Started With Python Functions&lt;a class=&quot;headerlink&quot; href=&quot;#getting-started-with-python-functions&quot; title=&quot;Permanent link&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Most programming languages allow you to assign a name to a code block that performs a concrete computation. These named code blocks can be reused quickly because you can use their name to call them from different places in your code.&lt;/p&gt;
&lt;p&gt;Programmers call these named code blocks &lt;a href=&quot;https://en.wikipedia.org/wiki/Subroutine&quot;&gt;&lt;strong&gt;subroutines&lt;/strong&gt;&lt;/a&gt;, &lt;strong&gt;routines&lt;/strong&gt;, &lt;strong&gt;procedures&lt;/strong&gt;, or &lt;strong&gt;functions&lt;/strong&gt; depending on the language they use. In some languages, there’s a clear difference between a routine or procedure and a function. &lt;/p&gt;
&lt;p&gt;Sometimes that difference is so strong that you need to use a specific keyword to define a procedure or subroutine and another keyword to define a function. For example the &lt;a href=&quot;https://en.wikipedia.org/wiki/Visual_Basic&quot;&gt;Visual Basic&lt;/a&gt; programming language uses &lt;code&gt;Sub&lt;/code&gt; and &lt;code&gt;Function&lt;/code&gt; to differentiate between the two.&lt;/p&gt;
&lt;p&gt;In general, a &lt;strong&gt;procedure&lt;/strong&gt; is a named code block that performs a set of actions without computing a final value or result. On the other hand, a &lt;strong&gt;function&lt;/strong&gt; is a named code block that performs some actions with the purpose of computing a final value or result, which is then sent back to the caller code. Both procedures and functions can act upon a set of &lt;strong&gt;input values&lt;/strong&gt;, commonly known as &lt;strong&gt;arguments&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;In Python, these kinds of named code blocks are known as &lt;a href=&quot;https://realpython.com/defining-your-own-python-function/&quot;&gt;functions&lt;/a&gt; because they always send a value back to the caller. The Python documentation defines a function as follows:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;A series of statements which returns some value to a caller. It can also be passed zero or more &lt;a href=&quot;https://docs.python.org/3/glossary.html#term-argument&quot;&gt;arguments&lt;/a&gt; which may be used in the execution of the body. (&lt;a href=&quot;https://docs.python.org/3/glossary.html#term-function&quot;&gt;Source&lt;/a&gt;)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Even though the official documentation states that a function “returns some value to the caller,” you’ll soon see that functions can return any Python object to the caller code.&lt;/p&gt;
&lt;p&gt;In general, a function &lt;strong&gt;takes&lt;/strong&gt; arguments (if any), &lt;strong&gt;performs&lt;/strong&gt; some operations, and &lt;strong&gt;returns&lt;/strong&gt; a value (or object). The value that a function returns to the caller is generally known as the function’s &lt;strong&gt;return value&lt;/strong&gt;. All Python functions have a return value, either explicit or implicit. You’ll cover the difference between explicit and implicit return values later in this tutorial.&lt;/p&gt;
&lt;p&gt;To write a Python function, you need a &lt;strong&gt;header&lt;/strong&gt; that starts with the &lt;a href=&quot;https://realpython.com/defining-your-own-python-function/&quot;&gt;&lt;code&gt;def&lt;/code&gt; keyword&lt;/a&gt;, followed by the name of the function, an optional list of comma-separated arguments inside a required pair of parentheses, and a final colon.&lt;/p&gt;
&lt;p&gt;The second component of a function is its &lt;strong&gt;code block&lt;/strong&gt;, or &lt;strong&gt;body&lt;/strong&gt;. Python defines code blocks using &lt;a href=&quot;https://docs.python.org/3/reference/lexical_analysis.html#indentation&quot;&gt;indentation&lt;/a&gt; instead of brackets, &lt;code&gt;begin&lt;/code&gt; and &lt;code&gt;end&lt;/code&gt; keywords, and so on. So, to define a function in Python you can use the following syntax:&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;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;function_name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;arg1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;arg2&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;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argN&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;# Function&#x27;s code goes here...&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;pass&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;When you’re coding a Python function, you need to define a header with the &lt;code&gt;def&lt;/code&gt; keyword, the name of the function, and a list of arguments in parentheses. Note that the list of arguments is optional, but the parentheses are syntactically required. Then you need to define the function’s code block, which will begin one level of indentation to the right.&lt;/p&gt;
&lt;p&gt;In the above example, you use a &lt;a href=&quot;https://docs.python.org/3/reference/simple_stmts.html#grammar-token-pass_stmt&quot;&gt;&lt;code&gt;pass&lt;/code&gt; statement&lt;/a&gt;. This kind of statement is useful when you need a placeholder statement in your code to make it syntactically correct, but you don’t need to perform any action. &lt;code&gt;pass&lt;/code&gt; statements are also known as the &lt;strong&gt;null operation&lt;/strong&gt; because they don’t perform any action.&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 full syntax to define functions and their arguments is beyond the scope of this tutorial. For an in-depth resource on this topic, check out &lt;a href=&quot;https://realpython.com/defining-your-own-python-function/&quot;&gt;Defining Your Own Python Function&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;To use a function, you need to call it. A function call consists of the function’s name followed by the function’s arguments in parentheses:&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;function_name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;arg1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;arg2&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;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argN&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;You’ll need to pass arguments to a function call only if the function requires them. The parentheses, on the other hand, are always required in a function call. If you forget them, then you won’t be calling the function but referencing it as a function object.&lt;/p&gt;
&lt;p&gt;To make your functions return a value, you need to use the &lt;a href=&quot;https://docs.python.org/3/reference/simple_stmts.html#grammar-token-return_stmt&quot;&gt;Python &lt;code&gt;return&lt;/code&gt; statement&lt;/a&gt;. That’s what you’ll cover from this point on.&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python-return-statement/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-return-statement/ »&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 #28: Using Pylance to Write Better Python Inside of Visual Studio Code</title>
      <id>https://realpython.com/podcasts/rpp/28/</id>
      <link href="https://realpython.com/podcasts/rpp/28/"/>
      <updated>2020-09-25T12:00:00+00:00</updated>
      <summary>A big decision a developer has to make is what tool to use to write code? Would you like an editor that understands Python, and is there to help with suggestions, definitions, and analysis of your code? For many developers, its the free tool, Visual Studio Code. This week on the show, we have Savannah Ostrowski, program manager for the Python Language Server and Python in Visual Studio. We discuss Pylance, a new language server with fast, feature-rich language support for Python in VS Code.</summary>
      <content type="html">
        &lt;p&gt;A big decision a developer has to make is what tool to use to write code? Would you like an editor that understands Python, and is there to help with suggestions, definitions, and analysis of your code? For many developers, its the free tool, Visual Studio Code. This week on the show, we have Savannah Ostrowski, program manager for the Python Language Server and Python in Visual Studio. We discuss Pylance, a new language server with fast, feature-rich language support for Python in VS Code.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Python Community Interview With David Amos</title>
      <id>https://realpython.com/interview-david-amos/</id>
      <link href="https://realpython.com/interview-david-amos/"/>
      <updated>2020-09-23T14:00:00+00:00</updated>
      <summary>David Amos is the content technical lead at Real Python. He&#x27;s also a co-curator of PyCoder&#x27;s Weekly and the author of the Python Basics book. Join us as we talk about all those things as well as his love for LEGO and mathematics.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;This week I’m joined by &lt;a href=&quot;https://realpython.com/team/damos/&quot;&gt;David Amos&lt;/a&gt;, the content technical lead here at &lt;em&gt;Real Python&lt;/em&gt;. &lt;/p&gt;
&lt;p&gt;In this interview, we talk about David’s love of LEGO and mathematics. We also talk about the &lt;a href=&quot;https://realpython.com/products/python-basics-book/&quot;&gt;&lt;em&gt;Python Basics&lt;/em&gt; book&lt;/a&gt;, which is soon to be out of early access, and his involvement with &lt;a href=&quot;https://pycoders.com/&quot;&gt;&lt;em&gt;PyCoder’s Weekly&lt;/em&gt;&lt;/a&gt;. So, without further ado, let’s get started.&lt;/p&gt;
&lt;p class=&quot;mt-5&quot;&gt;&lt;strong&gt;Ricky:&lt;/strong&gt; &lt;em&gt;Thank you for joining me, David. Many of our readers and members may already know your background, but for those who don’t, let’s ask the inevitable questions: How did you get into programming, and when did you start using Python?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;img loading=&quot;lazy&quot; class=&quot;img-fluid w-25 float-right ml-3 rounded-circle&quot; src=&quot;https://files.realpython.com/media/me-small.f5f49f1c48e1.jpg&quot; width=&quot;400&quot; height=&quot;400&quot; srcset=&quot;https://robocrop.realpython.net/?url=https%3A//files.realpython.com/media/me-small.f5f49f1c48e1.jpg&amp;amp;w=100&amp;amp;sig=38ffd9d7b49fe40a58e5868b04945ed741d6fef4 100w, https://robocrop.realpython.net/?url=https%3A//files.realpython.com/media/me-small.f5f49f1c48e1.jpg&amp;amp;w=200&amp;amp;sig=a308986ef202a905cf5376513299b30cb2ec7538 200w, https://files.realpython.com/media/me-small.f5f49f1c48e1.jpg 400w&quot; sizes=&quot;75vw&quot; alt=&quot;David Amos&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;David:&lt;/strong&gt; I discovered programming by accident when I came across the source code for the &lt;a href=&quot;https://archive.org/details/GorillasQbasic&quot;&gt;Gorillas game&lt;/a&gt; on my parents’ &lt;a href=&quot;https://en.wikipedia.org/wiki/IBM_Personal_System/2&quot;&gt;IBM 386 PS/2 computer&lt;/a&gt;. I guess I was about seven or eight years old. I found something called a &lt;code&gt;.BAS&lt;/code&gt; file that opened up a program called &lt;a href=&quot;https://en.wikipedia.org/wiki/QBasic&quot;&gt;QBasic&lt;/a&gt; and had all sorts of strange-looking text in it. I was instantly intrigued!&lt;/p&gt;
&lt;p&gt;There was a note at the top of the file that explained how to adjust the game speed. I changed the value and ran the game. The effect was instantly noticeable. It was a thrilling experience.&lt;/p&gt;
&lt;p&gt;I was obsessed with learning to program in QBasic. I made my own text adventure games. I even made a few animations using simple geometric shapes. It was tons of fun!&lt;/p&gt;
&lt;p&gt;QBasic was a &lt;a href=&quot;http://www.nicolasbize.com/blog/30-years-later-qbasic-is-still-the-best/&quot;&gt;fantastic language&lt;/a&gt; for an eight-year-old kid to learn. It was challenging enough to keep me interested but easy enough to get quick results, which is really important for a child.&lt;/p&gt;
&lt;p&gt;When I was around ten years old, I tried to teach myself C++. The ideas were too complex, and results came too slowly. After a few months of struggling, I stopped. But the idea of programming computers remained attractive to me—enough so that I took a web technology class in high school and learned the basics of HTML, CSS, and JavaScript.&lt;/p&gt;
&lt;p&gt;In college, I decided to major in mathematics, but I needed a minor. I chose computer science because I thought having some experience with programming would make it easier to complete the degree requirements.&lt;/p&gt;
&lt;p&gt;I learned about data structures with C++. I took an object-oriented programming class with Java. I studied operating systems and parallel computing with C. My programming horizons expanded vastly, and I found the whole subject pleasing both practically and intellectually.&lt;/p&gt;
&lt;p&gt;At that time, I viewed programming as a tool to help me with mathematics research. In graduate school, I wrote programs to generate examples and test ideas for my research projects.&lt;/p&gt;
&lt;p&gt;It was during graduate school, around 2013, that I found Python and pretty much instantly fell in love. I’d been using C++, MATLAB, and Mathematica as my primary research tools, but Python allowed me to focus on the research problem without getting caught up in the code.&lt;/p&gt;
&lt;p&gt;And with Python’s awesome ecosystem of tools for scientific computing, like &lt;a href=&quot;https://realpython.com/numpy-array-programming/&quot;&gt;NumPy&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python-scipy-cluster-optimize/&quot;&gt;SciPy&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/linear-programming-python/&quot;&gt;PuLP&lt;/a&gt;, and &lt;a href=&quot;https://networkx.github.io/&quot;&gt;NetworkX&lt;/a&gt;, I had everything I needed to tackle problems &lt;a href=&quot;https://realpython.com/matlab-vs-python/&quot;&gt;like I would with MATLAB&lt;/a&gt; but in a much more expressive manner!&lt;/p&gt;
&lt;p class=&quot;mt-5&quot;&gt;&lt;strong&gt;Ricky:&lt;/strong&gt; &lt;em&gt;You often hear the myth that a strong mathematics background is a prerequisite to be a programmer. While I think you’ll agree that it’s not always necessary for programmers to know advanced math, I’m curious to know how your math and data science background has helped you when writing code.&lt;/em&gt;&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/interview-david-amos/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/interview-david-amos/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Working With Linked Lists in Python</title>
      <id>https://realpython.com/courses/working-linked-lists-python/</id>
      <link href="https://realpython.com/courses/working-linked-lists-python/"/>
      <updated>2020-09-22T14:00:00+00:00</updated>
      <summary>In this course, you&#x27;ll learn what linked lists are and when to use them, such as when you want to implement queues, stacks, or graphs. You&#x27;ll also learn how to use collections.deque to improve the performance of your linked lists and how to implement linked lists in your own projects.</summary>
      <content type="html">
        &lt;p&gt;&lt;strong&gt;Linked lists&lt;/strong&gt; are like a lesser-known cousin of &lt;a href=&quot;https://realpython.com/python-lists-tuples/&quot;&gt;lists&lt;/a&gt;. They&amp;rsquo;re not as popular or as cool, and you might not even remember them from your algorithms class. But in the right context, they can really shine. If you&amp;rsquo;re looking to brush up on your coding skills for a &lt;a href=&quot;https://realpython.com/python-coding-interview-tips/&quot;&gt;job interview&lt;/a&gt;, or if you want to learn more about &lt;a href=&quot;https://realpython.com/python-data-structures/&quot;&gt;Python data structures&lt;/a&gt; besides the usual &lt;a href=&quot;https://realpython.com/python-dicts/&quot;&gt;dictionaries&lt;/a&gt; and &lt;a href=&quot;https://realpython.com/python-lists-tuples/&quot;&gt;lists&lt;/a&gt;, then you&amp;rsquo;ve come to the right place!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this course, you&amp;rsquo;ll learn:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;What &lt;strong&gt;linked lists&lt;/strong&gt; are and when you should use them&lt;/li&gt;
&lt;li&gt;How to use &lt;strong&gt;&lt;code&gt;collections.deque&lt;/code&gt;&lt;/strong&gt; for all of your linked list needs&lt;/li&gt;
&lt;li&gt;How to &lt;strong&gt;implement&lt;/strong&gt; your own linked lists&lt;/li&gt;
&lt;li&gt;What the &lt;strong&gt;other types&lt;/strong&gt; of linked lists are and what they can be used for&lt;/li&gt;
&lt;/ul&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Python Practice Problems: Get Ready for Your Next Interview</title>
      <id>https://realpython.com/python-practice-problems/</id>
      <link href="https://realpython.com/python-practice-problems/"/>
      <updated>2020-09-21T14:00:00+00:00</updated>
      <summary>In this tutorial, you&#x27;ll prepare for future interviews by working through a set of Python practice problems that commonly appear in coding tests. You&#x27;ll work through the problems yourself and then compare your results with solutions developed by the Real Python team.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Are you a Python developer brushing up on your skills before an &lt;a href=&quot;https://realpython.com/learning-paths/python-interview/&quot;&gt;interview&lt;/a&gt;? If so, then this tutorial will usher you through a series of &lt;strong&gt;Python practice problems&lt;/strong&gt; meant to simulate common coding test scenarios. After you develop your own solutions, you’ll walk through  the &lt;em&gt;Real Python&lt;/em&gt; team’s answers so you can optimize your code, impress your interviewer, and land your dream job!&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;Write code&lt;/strong&gt; for interview-style problems&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Discuss your solutions&lt;/strong&gt; during the interview&lt;/li&gt;
&lt;li&gt;Work through &lt;strong&gt;frequently overlooked details&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Talk about &lt;strong&gt;design decisions&lt;/strong&gt; and trade-offs&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This tutorial is aimed at intermediate Python developers. It assumes a &lt;a href=&quot;https://realpython.com/learning-paths/python3-introduction/&quot;&gt;basic knowledge of Python&lt;/a&gt; and an ability to solve problems in Python. You can get skeleton code with failing unit tests for each of the problems you’ll see in this tutorial by clicking on the link below:&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;&lt;p&gt;&lt;strong&gt;Download the sample code:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/python-practice-problems-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-python-practice-problems-code&quot; data-focus=&quot;false&quot;&gt;Click here to get the code you&#x27;ll use&lt;/a&gt; to work through the Python practice problems in this tutorial.&lt;/p&gt;&lt;/div&gt;

&lt;p&gt;Each of the problems below shows the file header from this skeleton code describing the problem requirements. So download the code, fire up your favorite editor, and let’s dive into some Python practice problems!&lt;/p&gt;
&lt;h2 id=&quot;python-practice-problem-1-sum-of-a-range-of-integers&quot;&gt;Python Practice Problem 1: Sum of a Range of Integers&lt;a class=&quot;headerlink&quot; href=&quot;#python-practice-problem-1-sum-of-a-range-of-integers&quot; title=&quot;Permanent link&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Let’s start with a warm-up question. In the first practice problem, you’ll write code to sum a &lt;a href=&quot;https://realpython.com/python-lists-tuples/&quot;&gt;list&lt;/a&gt; of &lt;a href=&quot;https://realpython.com/lessons/integers/&quot;&gt;integers&lt;/a&gt;. Each practice problem includes a problem description. This description is pulled directly from the skeleton files in the repo to make it easier to remember while you’re working on your solution.&lt;/p&gt;
&lt;p&gt;You’ll see a solution section for each problem as well. Most of the discussion will be in a collapsed section below that. Clone that repo if you haven’t already, work out a solution to the following problem, then expand the solution box to review your work.&lt;/p&gt;
&lt;h3 id=&quot;problem-description&quot;&gt;Problem Description&lt;a class=&quot;headerlink&quot; href=&quot;#problem-description&quot; title=&quot;Permanent link&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Here’s your first problem:&lt;/p&gt;
&lt;div class=&quot;highlight python&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;c1&quot;&gt;# integersums.py&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;&quot;&quot;&quot; Sum of Integers Up To n&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;    Write a function, add_it_up(), that takes a single integer as input&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;    and returns the sum of the integers from zero to the input parameter.&lt;/span&gt;

&lt;span class=&quot;sd&quot;&gt;    The function should return 0 if a non-integer is passed in.&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;&quot;&quot;&quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Remember to run the unit tests until you get them passing!&lt;/p&gt;
&lt;h3 id=&quot;problem-solution&quot;&gt;Problem Solution&lt;a class=&quot;headerlink&quot; href=&quot;#problem-solution&quot; title=&quot;Permanent link&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Here’s some discussion of a couple of possible solutions.&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; Remember, don’t open the collapsed section below until you’re ready to look at the answer for this Python practice problem!&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;card mb-3&quot; id=&quot;collapse_card87529a&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;#collapse87529a&quot; aria-expanded=&quot;false&quot; aria-controls=&quot;collapse87529a&quot;&gt;&lt;span class=&quot;float-left&quot;&gt;Solution for Sum of a Range of Integers&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 id=&quot;collapse87529a&quot; class=&quot;collapse&quot; data-parent=&quot;#collapse_card87529a&quot;&gt;&lt;div class=&quot;card-body&quot; markdown=&quot;1&quot;&gt;

&lt;p&gt;How did writing the solution go? Ready to look at the answer?&lt;/p&gt;
&lt;p&gt;For this problem, you’ll look at a few different solutions. The first of these is not so good:&lt;/p&gt;
&lt;div class=&quot;highlight python&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;c1&quot;&gt;# integersums.py&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;first&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;num&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;nb&quot;&gt;sum&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;num&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;n&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;nb&quot;&gt;sum&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;sum&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;num&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;num&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;num&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;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;sum&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;In this solution, you manually build a &lt;code&gt;while&lt;/code&gt; loop to run through the numbers &lt;code&gt;1&lt;/code&gt; through &lt;code&gt;n&lt;/code&gt;. You keep a running &lt;code&gt;sum&lt;/code&gt; and then return it when you’ve finished the loop.&lt;/p&gt;
&lt;p&gt;This solution works, but it has two problems:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;It doesn’t display your knowledge of Python and how the language simplifies tasks like this.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;It doesn’t meet the error conditions in the problem description. Passing in a &lt;a href=&quot;https://realpython.com/python-strings/&quot;&gt;string&lt;/a&gt; will result in the function throwing an exception when it should just return &lt;code&gt;0&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;You’ll deal with the error conditions in the final answer below, but first let’s refine the core solution to be a bit more &lt;a href=&quot;https://realpython.com/learning-paths/writing-pythonic-code/&quot;&gt;Pythonic&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The first thing to think about is that &lt;a href=&quot;https://realpython.com/python-while-loop/&quot;&gt;&lt;code&gt;while&lt;/code&gt; loop&lt;/a&gt;. Python has powerful mechanisms for iterating over lists and ranges. Creating your own is usually unnecessary, and that’s certainly the case here. You can replace the &lt;code&gt;while&lt;/code&gt; loop with a loop that iterates over a &lt;a href=&quot;https://realpython.com/python-range/&quot;&gt;&lt;code&gt;range()&lt;/code&gt;&lt;/a&gt;:&lt;/p&gt;
&lt;div class=&quot;highlight python&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;c1&quot;&gt;# integersums.py&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;better&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;sum&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;num&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;range&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;n&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
        &lt;span class=&quot;nb&quot;&gt;sum&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;num&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;sum&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;You can see that the &lt;code&gt;for...range()&lt;/code&gt; construct has replaced your &lt;code&gt;while&lt;/code&gt; loop and shortened the code. One thing to note is that &lt;code&gt;range()&lt;/code&gt; goes up to but does not include the number given, so you need to use &lt;code&gt;n + 1&lt;/code&gt; here.&lt;/p&gt;
&lt;p&gt;This was a nice step! It removes some of the boilerplate code of looping over a range and makes your intention clearer. But there’s still more you can do here.&lt;/p&gt;
&lt;p&gt;Summing a list of integers is another thing Python is good at:&lt;/p&gt;
&lt;div class=&quot;highlight python&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;c1&quot;&gt;# integersums.py&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;even_better&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;sum&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;range&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;n&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;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Wow! By using the built-in &lt;code&gt;sum()&lt;/code&gt;, you got this down to one line of code! While &lt;a href=&quot;https://en.wikipedia.org/wiki/Code_golf&quot;&gt;code golf&lt;/a&gt; generally doesn’t produce the most readable code, in this case you have a win-win: shorter &lt;em&gt;and&lt;/em&gt; more readable code.&lt;/p&gt;
&lt;p&gt;There’s one problem remaining, however. This code still doesn’t handle the error conditions correctly. To fix that, you can wrap your previous code in a &lt;code&gt;try...except&lt;/code&gt; block:&lt;/p&gt;
&lt;div class=&quot;highlight python&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;c1&quot;&gt;# integersums.py&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;add_it_up&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;try&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;result&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;sum&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;range&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;n&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;k&quot;&gt;except&lt;/span&gt; &lt;span class=&quot;ne&quot;&gt;TypeError&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;result&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;result&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;This solves the problem and handles the error conditions correctly. Way to go!&lt;/p&gt;
&lt;p&gt;Occasionally, interviewers will ask this question with a fixed limit, something like “Print the sum of the first nine integers.” When the problem is phrased that way, one correct solution would be &lt;code&gt;print(45)&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;If you give this answer, however, then you should follow up with code that solves the problem step by step. The trick answer is a good place to start your answer, but it’s not a great place to end.&lt;/p&gt;
&lt;p&gt;If you’d like to extend this problem, try adding an optional lower limit to &lt;code&gt;add_it_up()&lt;/code&gt; to give it more flexibility!&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;h2 id=&quot;python-practice-problem-2-caesar-cipher&quot;&gt;Python Practice Problem 2: Caesar Cipher&lt;a class=&quot;headerlink&quot; href=&quot;#python-practice-problem-2-caesar-cipher&quot; title=&quot;Permanent link&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python-practice-problems/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-practice-problems/ »&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 #27: Preparing for an Interview With Python Practice Problems</title>
      <id>https://realpython.com/podcasts/rpp/27/</id>
      <link href="https://realpython.com/podcasts/rpp/27/"/>
      <updated>2020-09-18T12:00:00+00:00</updated>
      <summary>What is an effective way to prepare for a Python interview? Would you like a set of problems that increase in difficulty to practice and hone your Python skills?  This week on the show, we have Jim Anderson to talk about his new Real Python article, &quot;Python Practice Problems: Get Ready for Your Next Interview.&quot;  This article provides several problems, which include skeleton code, unit tests, and solutions for you to compare your work.</summary>
      <content type="html">
        &lt;p&gt;What is an effective way to prepare for a Python interview? Would you like a set of problems that increase in difficulty to practice and hone your Python skills?  This week on the show, we have Jim Anderson to talk about his new Real Python article, &quot;Python Practice Problems: Get Ready for Your Next Interview.&quot;  This article provides several problems, which include skeleton code, unit tests, and solutions for you to compare your work.&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>Numbers in Python</title>
      <id>https://realpython.com/python-numbers/</id>
      <link href="https://realpython.com/python-numbers/"/>
      <updated>2020-09-16T14:00:00+00:00</updated>
      <summary>In this tutorial, you&#x27;ll learn about numbers and basic math in Python. You&#x27;ll explore integer, floating-point numbers, and complex numbers and see how perform calculations using Python&#x27;s arithmetic operators, math functions, and number methods.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;You don’t need to be a math whiz to program well. The truth is, few programmers need to know more than basic algebra. Of course, how much math you need to know depends on the application you’re working on. In general, the level of math required to be a programmer is lower than you might expect. Although math and computer programming aren’t as correlated as some people might believe, &lt;strong&gt;numbers&lt;/strong&gt; are an integral part of any programming language, and &lt;strong&gt;Python&lt;/strong&gt; is no exception.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this tutorial, you’ll learn how to:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Create &lt;strong&gt;integers&lt;/strong&gt; and &lt;strong&gt;floating-point numbers&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Round numbers&lt;/strong&gt; to a given number of decimal places&lt;/li&gt;
&lt;li&gt;Format and display numbers in &lt;strong&gt;strings&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Let’s get started!&lt;/p&gt;
&lt;div class=&quot;alert alert-primary&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; This tutorial is adapted from the chapter “Numbers and Math” in &lt;a href=&quot;https://realpython.com/products/python-basics-book/&quot;&gt;&lt;em&gt;Python Basics: A Practical Introduction to Python 3&lt;/em&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The book uses Python’s built-in IDLE editor to create and edit Python files and interact with the Python shell, so you will see references to IDLE’s built-in debugging tools throughout this tutorial. However, you should have no problems running the example code from the editor and environment of your choice.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;&lt;p&gt;&lt;strong&gt;Free Bonus:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/python-mastery-course/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-python-mastery-course&quot; data-focus=&quot;false&quot;&gt;5 Thoughts On Python Mastery&lt;/a&gt;, a free course for Python developers that shows you the roadmap and the mindset you&#x27;ll need to take your Python skills to the next level.&lt;/p&gt;&lt;/div&gt;

&lt;h2 id=&quot;integers-and-floating-point-numbers&quot;&gt;Integers and Floating-Point Numbers&lt;a class=&quot;headerlink&quot; href=&quot;#integers-and-floating-point-numbers&quot; title=&quot;Permanent link&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Python has three built-in numeric &lt;a href=&quot;https://realpython.com/python-data-types/&quot;&gt;data types&lt;/a&gt;: integers, floating-point numbers, and complex numbers. In this section, you’ll learn about integers and floating-point numbers, which are the two most commonly used number types. You’ll learn about complex numbers in &lt;a href=&quot;#complex-numbers&quot;&gt;a later section&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&quot;integers&quot;&gt;Integers&lt;a class=&quot;headerlink&quot; href=&quot;#integers&quot; title=&quot;Permanent link&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;An &lt;strong&gt;integer&lt;/strong&gt; is a whole number with no decimal places. For example, &lt;code&gt;1&lt;/code&gt; is an integer, but &lt;code&gt;1.0&lt;/code&gt; isn’t. The name for the integer data type is &lt;code&gt;int&lt;/code&gt;, which you can see with &lt;code&gt;type()&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;nb&quot;&gt;type&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;go&quot;&gt;&amp;lt;class &#x27;int&#x27;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;You can create an integer by typing the desired number. For instance, the following assigns the integer &lt;code&gt;25&lt;/code&gt; to the variable &lt;code&gt;num&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;num&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;25&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;When you create an integer like this, the value &lt;code&gt;25&lt;/code&gt; is called an &lt;strong&gt;integer literal&lt;/strong&gt; because the integer is literally typed into the code.&lt;/p&gt;
&lt;p&gt;You may already be familiar with how to &lt;a href=&quot;https://realpython.com/convert-python-string-to-int/&quot;&gt;convert a string containing an integer to a number&lt;/a&gt; using &lt;code&gt;int()&lt;/code&gt;. For example, the following converts the string &lt;code&gt;&quot;25&quot;&lt;/code&gt; to the integer &lt;code&gt;25&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;nb&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;25&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;25&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;code&gt;int(&quot;25&quot;)&lt;/code&gt; is not an integer literal because the integer value is created from a string.&lt;/p&gt;
&lt;p&gt;When you write large numbers by hand, you typically group digits into groups of three separated by a comma or a decimal point. The number 1,000,000 is a lot easier to read than 1000000.&lt;/p&gt;
&lt;p&gt;In Python, you can’t use commas to group digits in integer literals, but you can use underscores (&lt;code&gt;_&lt;/code&gt;). Both of the following are valid ways to represent the number one million as an integer literal:&lt;/p&gt;
&lt;div class=&quot;highlight python repl&quot;&gt;&lt;span class=&quot;repl-toggle&quot; title=&quot;Toggle REPL prompts and output&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1000000&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;1000000&lt;/span&gt;

&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1_000_000&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;1000000&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;There’s no limit to how large an integer can be, which might be surprising considering that computers have a finite amount of memory. Try typing the largest number you can think of into IDLE’s interactive window. Python can handle it with no problem!&lt;/p&gt;
&lt;h3 id=&quot;floating-point-numbers&quot;&gt;Floating-Point Numbers&lt;a class=&quot;headerlink&quot; href=&quot;#floating-point-numbers&quot; title=&quot;Permanent link&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;A &lt;strong&gt;floating-point number&lt;/strong&gt;, or &lt;strong&gt;float&lt;/strong&gt; for short, is a number with a decimal place. &lt;code&gt;1.0&lt;/code&gt; is a floating-point number, as is &lt;code&gt;-2.75&lt;/code&gt;. The name of the floating-point data type is &lt;code&gt;float&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;nb&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;1.0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&amp;lt;class &#x27;float&#x27;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Like integers, floats can be created from &lt;strong&gt;floating-point literals&lt;/strong&gt; or by converting a string to a float with &lt;code&gt;float()&lt;/code&gt;:&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python-numbers/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-numbers/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Command Line Interfaces in Python</title>
      <id>https://realpython.com/courses/command-line-interfaces/</id>
      <link href="https://realpython.com/courses/command-line-interfaces/"/>
      <updated>2020-09-15T14:00:00+00:00</updated>
      <summary>Command line arguments are the key to converting your programs into useful and enticing tools that are ready to be used in the terminal of your operating system. In this course, you&#x27;ll learn their origins, standards, and basics, and how to implement them in your program.</summary>
      <content type="html">
        &lt;p&gt;Adding the capability of processing &lt;strong&gt;Python command line arguments&lt;/strong&gt; provides a user-friendly interface to your text-based command line program. It&amp;rsquo;s similar to what a graphical user interface is for a visual application that&amp;rsquo;s manipulated by graphical elements or widgets.&lt;/p&gt;
&lt;p&gt;Python exposes a mechanism to capture and extract your Python command line arguments. These values can be used to modify the behavior of a program. For example, if your program processes data read from a file, then you can pass the name of the file to your program, rather than hard-coding the value in your source code.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;By the end of this course, you&amp;rsquo;ll know:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;The origins&lt;/strong&gt; of Python command line arguments&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The underlying support&lt;/strong&gt; for Python command line arguments&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The standards&lt;/strong&gt; guiding the design of a command line interface&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The basics&lt;/strong&gt; to manually customize and handle Python command line arguments&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The libraries&lt;/strong&gt; available in Python to ease the development of a complex command line interface&lt;/li&gt;
&lt;/ul&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Plot With Pandas: Python Data Visualization for Beginners</title>
      <id>https://realpython.com/pandas-plot-python/</id>
      <link href="https://realpython.com/pandas-plot-python/"/>
      <updated>2020-09-14T14:00:00+00:00</updated>
      <summary>In this tutorial, you&#x27;ll get to know the basic plotting possibilities that Python provides in the popular data analysis library pandas. You&#x27;ll learn about the different kinds of plots that pandas offers, how to use them for data exploration, and which types of plots are best for certain use cases.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Whether you’re just getting to know a dataset or preparing to publish your findings, &lt;strong&gt;visualization&lt;/strong&gt; is an essential tool. Python’s popular data analysis library, &lt;a href=&quot;https://pandas.pydata.org/about/&quot;&gt;pandas&lt;/a&gt;, provides several different options for visualizing your data with &lt;code&gt;.plot()&lt;/code&gt;. Even if you’re at the beginning of your pandas journey, you’ll soon be creating basic plots that will yield valuable insights into your data.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this tutorial, you’ll learn:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;What the different types of &lt;strong&gt;pandas plots&lt;/strong&gt; are and when to use them&lt;/li&gt;
&lt;li&gt;How to get an overview of your dataset with a &lt;strong&gt;histogram&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;How to discover correlation with a &lt;strong&gt;scatter plot&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;How to analyze different &lt;strong&gt;categories&lt;/strong&gt; and their &lt;strong&gt;ratios&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;&lt;p&gt;&lt;strong&gt;Free Bonus:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/conda-cheatsheet/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-conda-cheatsheet&quot; data-focus=&quot;false&quot;&gt;Click here to get access to a Conda cheat sheet&lt;/a&gt; with handy usage examples for managing your Python environment and packages.&lt;/p&gt;&lt;/div&gt;

&lt;h2 id=&quot;set-up-your-environment&quot;&gt;Set Up Your Environment&lt;a class=&quot;headerlink&quot; href=&quot;#set-up-your-environment&quot; title=&quot;Permanent link&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;You can best follow along with the code in this tutorial in a &lt;a href=&quot;https://realpython.com/jupyter-notebook-introduction/&quot;&gt;Jupyter Notebook&lt;/a&gt;. This way, you’ll immediately see your plots and be able to play around with them.&lt;/p&gt;
&lt;p&gt;You’ll also need a working Python environment including pandas. If you don’t have one yet, then you have several options:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;If you have more ambitious plans, then download the &lt;a href=&quot;https://www.anaconda.com/distribution/&quot;&gt;Anaconda distribution&lt;/a&gt;. It’s huge (around 500 MB), but you’ll be equipped for most data science work.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If you prefer a minimalist setup, then check out the section on installing Miniconda in &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;/li&gt;
&lt;li&gt;
&lt;p&gt;If you want to stick to &lt;a href=&quot;https://realpython.com/what-is-pip/&quot;&gt;&lt;code&gt;pip&lt;/code&gt;&lt;/a&gt;, then install the libraries discussed in this tutorial with &lt;code&gt;pip install pandas matplotlib&lt;/code&gt;. You can also grab Jupyter Notebook with &lt;code&gt;pip install jupyterlab&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If you don’t want to do any setup, then follow along in an online &lt;a href=&quot;https://jupyter.org/try&quot;&gt;Jupyter Notebook trial&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Once your environment is set up, you’re ready to download a dataset. In this tutorial, you’re going to analyze data on college majors sourced from the &lt;a href=&quot;https://www.census.gov/newsroom/press-releases/2014/cb14-tps12.html&quot;&gt;American Community Survey 2010–2012 Public Use Microdata Sample&lt;/a&gt;. It served as the basis for the &lt;a href=&quot;https://fivethirtyeight.com/features/the-economic-guide-to-picking-a-college-major/&quot;&gt;Economic Guide To Picking A College Major&lt;/a&gt; featured on the website &lt;a href=&quot;https://fivethirtyeight.com/&quot;&gt;FiveThirtyEight&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;First, download the data by passing the download URL to &lt;code&gt;pandas.read_csv()&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;In [1]: &lt;/span&gt;&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;pandas&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;pd&lt;/span&gt;

&lt;span class=&quot;gp&quot;&gt;In [2]: &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;download_url&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;   ...: &lt;/span&gt;    &lt;span class=&quot;s2&quot;&gt;&quot;https://raw.githubusercontent.com/fivethirtyeight/&quot;&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;   ...: &lt;/span&gt;    &lt;span class=&quot;s2&quot;&gt;&quot;data/master/college-majors/recent-grads.csv&quot;&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;   ...: &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;gp&quot;&gt;In [3]: &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;df&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pd&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;read_csv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;download_url&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;gp&quot;&gt;In [4]: &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;df&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;gh&quot;&gt;Out[4]: &lt;/span&gt;&lt;span class=&quot;go&quot;&gt;pandas.core.frame.DataFrame&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;By calling &lt;code&gt;read_csv()&lt;/code&gt;, you create a &lt;a href=&quot;https://pandas.pydata.org/pandas-docs/stable/reference/frame.html&quot;&gt;DataFrame&lt;/a&gt;, which is the main data structure used in pandas. &lt;/p&gt;
&lt;div class=&quot;alert alert-primary&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; You can follow along with this tutorial even if you aren’t familiar with DataFrames. But if you’re interested in learning more about working with pandas and DataFrames, then you can check out &lt;a href=&quot;https://realpython.com/pandas-python-explore-dataset/&quot;&gt;Using Pandas and Python to Explore Your Dataset&lt;/a&gt; and &lt;a href=&quot;https://realpython.com/pandas-dataframe/&quot;&gt;The Pandas DataFrame: Make Working With Data Delightful&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Now that you have a DataFrame, you can take a look at the data. First, you should configure the &lt;code&gt;display.max.columns&lt;/code&gt; option to make sure pandas doesn’t hide any columns. Then you can view the first few rows of data with &lt;a href=&quot;https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.head.html&quot;&gt;&lt;code&gt;.head()&lt;/code&gt;&lt;/a&gt;:&lt;/p&gt;
&lt;div class=&quot;highlight python repl&quot;&gt;&lt;span class=&quot;repl-toggle&quot; title=&quot;Toggle REPL prompts and output&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;In [5]: &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pd&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;set_option&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;display.max.columns&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;None&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;gp&quot;&gt;In [6]: &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;df&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;head&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;You’ve just displayed the first five rows of the DataFrame &lt;code&gt;df&lt;/code&gt; using &lt;code&gt;.head()&lt;/code&gt;. Your output should look like this:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://files.realpython.com/media/majors_df_head.31039ff82599.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/majors_df_head.31039ff82599.png&quot; width=&quot;996&quot; height=&quot;326&quot; srcset=&quot;https://robocrop.realpython.net/?url=https%3A//files.realpython.com/media/majors_df_head.31039ff82599.png&amp;amp;w=249&amp;amp;sig=24df3291308678017eb9836390c775f26616f840 249w, https://robocrop.realpython.net/?url=https%3A//files.realpython.com/media/majors_df_head.31039ff82599.png&amp;amp;w=498&amp;amp;sig=0b69297e403e1d8e214f42196048580cf78cbe15 498w, https://files.realpython.com/media/majors_df_head.31039ff82599.png 996w&quot; sizes=&quot;75vw&quot; alt=&quot;The output of df.head()&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The default number of rows displayed by &lt;code&gt;.head()&lt;/code&gt; is five, but you can specify any number of rows as an argument. For example, to display the first ten rows, you would use &lt;code&gt;df.head(10)&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&quot;create-your-first-pandas-plot&quot;&gt;Create Your First Pandas Plot&lt;a class=&quot;headerlink&quot; href=&quot;#create-your-first-pandas-plot&quot; title=&quot;Permanent link&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Your dataset contains some columns related to the earnings of graduates in each major:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;&quot;Median&quot;&lt;/code&gt;&lt;/strong&gt; is the median earnings of full-time, year-round workers.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;&quot;P25th&quot;&lt;/code&gt;&lt;/strong&gt; is the 25th percentile of earnings.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;&quot;P75th&quot;&lt;/code&gt;&lt;/strong&gt; is the 75th percentile of earnings.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;&quot;Rank&quot;&lt;/code&gt;&lt;/strong&gt; is the major’s rank by median earnings.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Let’s start with a plot displaying these columns. First, you need to set up your Jupyter Notebook to display plots with the &lt;code&gt;%matplotlib&lt;/code&gt; &lt;a href=&quot;https://ipython.readthedocs.io/en/stable/interactive/tutorial.html#magics-explained&quot;&gt;magic command&lt;/a&gt;:&lt;/p&gt;
&lt;div class=&quot;highlight python repl&quot;&gt;&lt;span class=&quot;repl-toggle&quot; title=&quot;Toggle REPL prompts and output&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;In [7]: &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;matplotlib&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;Using matplotlib backend: MacOSX&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The &lt;code&gt;%matplotlib&lt;/code&gt; magic command sets up your Jupyter Notebook for displaying plots with Matplotlib. The standard Matplotlib graphics backend is used by default, and your plots will be displayed in a separate window.&lt;/p&gt;
&lt;div class=&quot;alert alert-primary&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; You can change the Matplotlib backend by passing an argument to the &lt;code&gt;%matplotlib&lt;/code&gt; magic command.&lt;/p&gt;
&lt;p&gt;For example, the &lt;code&gt;inline&lt;/code&gt; backend is popular for Jupyter Notebooks because it displays the plot in the notebook itself, immediately below the cell that creates the plot:&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 [7]: &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;matplotlib&lt;/span&gt; inline
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;There are a number of other backends available. For more information, check out the &lt;a href=&quot;https://ipython.readthedocs.io/en/stable/interactive/plotting.html&quot;&gt;Rich Outputs tutorial&lt;/a&gt; in the IPython documentation.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/pandas-plot-python/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/pandas-plot-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 #26: 5 Years Podcasting Python with Michael Kennedy: Growth, GIL, Async, and More</title>
      <id>https://realpython.com/podcasts/rpp/26/</id>
      <link href="https://realpython.com/podcasts/rpp/26/"/>
      <updated>2020-09-11T12:00:00+00:00</updated>
      <summary>Why is Python pulling in so many new programmers? Maybe some of that growth is from Python being a full-spectrum language. This week on the show we have Michael Kennedy, the host of the podcast &quot;Talk Python to Me&quot;. Michael reflects on five years of podcasting about Python, and many of the changes he has seen in the Python landscape.</summary>
      <content type="html">
        &lt;p&gt;Why is Python pulling in so many new programmers? Maybe some of that growth is from Python being a full-spectrum language. This week on the show we have Michael Kennedy, the host of the podcast &quot;Talk Python to Me&quot;. Michael reflects on five years of podcasting about Python, and many of the changes he has seen in the Python landscape.&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>Find &amp; Fix Code Bugs in Python: Debug With IDLE</title>
      <id>https://realpython.com/python-debug-idle/</id>
      <link href="https://realpython.com/python-debug-idle/"/>
      <updated>2020-09-09T14:00:00+00:00</updated>
      <summary>In this tutorial, you&#x27;ll learn how to identify and fix logic errors, or bugs, in your Python code. You&#x27;ll use the built-in debugging tools in Python&#x27;s Integrated Development and Learning Environment to practice locating and resolving bugs in an example function.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Everyone makes mistakes—even seasoned professional developers! Python’s interactive interpreter, &lt;a href=&quot;https://realpython.com/python-idle/&quot;&gt;IDLE&lt;/a&gt;, is pretty good at catching mistakes like syntax errors and runtime errors, but there’s a third type of error that you may have already experienced. &lt;strong&gt;Logic errors&lt;/strong&gt; occur when an otherwise valid program doesn’t do what was intended. Logic errors cause unexpected behaviors called &lt;strong&gt;bugs&lt;/strong&gt;. Removing bugs is called &lt;strong&gt;debugging&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;A &lt;strong&gt;debugger&lt;/strong&gt; is a tool that helps you hunt down bugs and understand why they’re happening. Knowing how to find and fix bugs in your code is a skill that you’ll use for your entire coding career!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this tutorial, you’ll:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Learn how to use IDLE’s &lt;strong&gt;Debug Control&lt;/strong&gt; window&lt;/li&gt;
&lt;li&gt;Practice &lt;strong&gt;debugging&lt;/strong&gt; on a buggy function&lt;/li&gt;
&lt;li&gt;Learn &lt;strong&gt;alternative methods&lt;/strong&gt; for debugging your code&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;alert alert-primary&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; This tutorial is adapted from the chapter “Finding and Fixing Code Bugs” in &lt;a href=&quot;https://realpython.com/products/python-basics-book/&quot;&gt;&lt;em&gt;Python Basics: A Practical Introduction to Python 3&lt;/em&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The book uses Python’s built-in IDLE editor to create and edit Python files and interact with the Python shell, so you will see references to IDLE’s built-in debugging tools throughout this tutorial. However, you should be able to apply the same concepts to the debugger of your choice.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;&lt;p&gt;&lt;strong&gt;Free Bonus:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/python-mastery-course/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-python-mastery-course&quot; data-focus=&quot;false&quot;&gt;5 Thoughts On Python Mastery&lt;/a&gt;, a free course for Python developers that shows you the roadmap and the mindset you&#x27;ll need to take your Python skills to the next level.&lt;/p&gt;&lt;/div&gt;

&lt;h2 id=&quot;use-the-debug-control-window&quot;&gt;Use the Debug Control Window&lt;a class=&quot;headerlink&quot; href=&quot;#use-the-debug-control-window&quot; title=&quot;Permanent link&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The main interface to IDLE’s debugger is the Debug Control window, or the Debug window for short. You can open the Debug window by selecting &lt;em&gt;Debug→Debugger&lt;/em&gt; from the menu in the interactive window. Go ahead and open the Debug window.&lt;/p&gt;
&lt;div class=&quot;alert alert-primary&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; If the Debug menu is missing from your menu bar, then make sure to bring the interactive window into focus by clicking it.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Whenever the Debug window is open, the interactive window displays &lt;code&gt;[DEBUG ON]&lt;/code&gt; next to the prompt to indicate that the debugger is open. Now open a new editor window and arrange the three windows on your screen so that you can see all of them simultaneously.&lt;/p&gt;
&lt;p&gt;In this section, you’ll learn how the Debug window is organized, how to step through your code with the debugger one line at a time, and how to set breakpoints to help speed up the debugging process.&lt;/p&gt;
&lt;h3 id=&quot;the-debug-control-window-an-overview&quot;&gt;The Debug Control Window: An Overview&lt;a class=&quot;headerlink&quot; href=&quot;#the-debug-control-window-an-overview&quot; title=&quot;Permanent link&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;To see how the debugger works, you can start by writing a simple program without any bugs. Type the following into the editor window:&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;lineno&quot;&gt; 1 &lt;/span&gt;&lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;range&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&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;lineno&quot;&gt; 2 &lt;/span&gt;    &lt;span class=&quot;n&quot;&gt;j&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt; 3 &lt;/span&gt;    &lt;span class=&quot;nb&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sa&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;i is &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; and j is &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;j&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Save the file, then keep the Debug window open and press &lt;span class=&quot;keys&quot;&gt;&lt;kbd class=&quot;key-f5&quot;&gt;F5&lt;/kbd&gt;&lt;/span&gt;. You’ll notice that execution doesn’t get very far. &lt;/p&gt;
&lt;p&gt;The Debug window will look like this:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://files.realpython.com/media/debug_window_overview.ecfbe2ea7bd0.png&quot; target=&quot;_blank&quot;&gt;&lt;img loading=&quot;lazy&quot; class=&quot;img-fluid mx-auto d-block w-75&quot; src=&quot;https://files.realpython.com/media/debug_window_overview.ecfbe2ea7bd0.png&quot; width=&quot;832&quot; height=&quot;569&quot; srcset=&quot;https://robocrop.realpython.net/?url=https%3A//files.realpython.com/media/debug_window_overview.ecfbe2ea7bd0.png&amp;amp;w=208&amp;amp;sig=e81a7a73672b455c7fbd56fdae151a8e46b6d3be 208w, https://robocrop.realpython.net/?url=https%3A//files.realpython.com/media/debug_window_overview.ecfbe2ea7bd0.png&amp;amp;w=416&amp;amp;sig=ac60adcbd6808a313825acc27272ef5b1dbf504c 416w, https://files.realpython.com/media/debug_window_overview.ecfbe2ea7bd0.png 832w&quot; sizes=&quot;75vw&quot; alt=&quot;Image of IDLE&#x27;s Debug window&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Notice that the Stack panel at the top of the window contains the following message:&lt;/p&gt;
&lt;div class=&quot;highlight text&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&amp;gt; &#x27;__main__&#x27;.&amp;lt;module&amp;gt;(), line 1: for i in range(1, 4):
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;This tells you that &lt;strong&gt;line 1&lt;/strong&gt; (which contains the code &lt;code&gt;for i in range(1, 4):&lt;/code&gt;) is &lt;em&gt;about&lt;/em&gt; to be run but hasn’t started yet. The &lt;code&gt;&#x27;__main__&#x27;.module()&lt;/code&gt; part of the message refers to the fact that you’re currently in the main section of the program, as opposed to being, for example, in a function definition before the main block of code has been reached.&lt;/p&gt;
&lt;p&gt;Below the Stack panel is a Locals panel that lists some strange looking stuff like &lt;code&gt;__annotations__&lt;/code&gt;, &lt;code&gt;__builtins__&lt;/code&gt;, &lt;code&gt;__doc__&lt;/code&gt;, and so on. These are internal system variables that you can ignore for now. As your program runs, you’ll see variables declared in the code displayed in this window so that you can keep track of their value.&lt;/p&gt;
&lt;p&gt;There are five buttons located at the top left-hand corner of the Debug window: &lt;em&gt;Go&lt;/em&gt;, &lt;em&gt;Step&lt;/em&gt;, &lt;em&gt;Over&lt;/em&gt;, &lt;em&gt;Out&lt;/em&gt;, and &lt;em&gt;Quit&lt;/em&gt;. These buttons control how the debugger moves through your code.&lt;/p&gt;
&lt;p&gt;In the following sections, you’ll explore what each of these buttons does, starting with &lt;em&gt;Step&lt;/em&gt;.&lt;/p&gt;
&lt;h3 id=&quot;the-step-button&quot;&gt;The Step Button&lt;a class=&quot;headerlink&quot; href=&quot;#the-step-button&quot; title=&quot;Permanent link&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Go ahead and click &lt;em&gt;Step&lt;/em&gt; at the top left-hand corner of the Debug window. The Debug window changes a bit to look like this:&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python-debug-idle/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-debug-idle/ »&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>Exploring HTTPS and Cryptography in Python</title>
      <id>https://realpython.com/courses/exploring-https-cryptography/</id>
      <link href="https://realpython.com/courses/exploring-https-cryptography/"/>
      <updated>2020-09-08T14:00:00+00:00</updated>
      <summary>In this course, you&#x27;ll gain a working knowledge of the various factors that combine to keep communications over the Internet safe. You&#x27;ll see concrete examples of how to keep information secure and use cryptography to build your own Python HTTPS application.</summary>
      <content type="html">
        &lt;p&gt;Have you ever wondered why it&amp;rsquo;s okay for you to send your credit card information over the Internet? You may have noticed the &lt;code&gt;https://&lt;/code&gt; on URLs in your browser, but what is it, and how does it &lt;strong&gt;keep your information safe&lt;/strong&gt;? Or perhaps you want to create a Python HTTPS application, but you&amp;rsquo;re not exactly sure what that means.&lt;/p&gt;
&lt;p&gt;In this course, you&amp;rsquo;ll get a working knowledge of the various factors that combine to keep communications over the Internet safe. You&amp;rsquo;ll see concrete examples of how a Python HTTPS application keeps information secure.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this course, you&amp;rsquo;ll learn how to:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Monitor and analyze &lt;strong&gt;network traffic&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Apply &lt;strong&gt;cryptography&lt;/strong&gt; to keep data safe&lt;/li&gt;
&lt;li&gt;Describe the core concepts of &lt;strong&gt;Public Key Infrastructure (PKI)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Create your own &lt;strong&gt;Certificate Authority&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Build a &lt;strong&gt;Python HTTPS application&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Identify common Python HTTPS &lt;strong&gt;warnings and errors&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast – Episode #25: Data Version Control in Python and Real Python Video Transcripts</title>
      <id>https://realpython.com/podcasts/rpp/25/</id>
      <link href="https://realpython.com/podcasts/rpp/25/"/>
      <updated>2020-09-04T12:00:00+00:00</updated>
      <summary>Wouldn&#x27;t it be nice to a use a form of version control for data? Something that would allow you to track and version your datasets and models. Well, that&#x27;s what the tool called DVC is designed to do. This week on the show, David Amos is here and he&#x27;s brought another batch of PyCoder’s Weekly articles and projects.</summary>
      <content type="html">
        &lt;p&gt;Wouldn&#x27;t it be nice to a use a form of version control for data? Something that would allow you to track and version your datasets and models. Well, that&#x27;s what the tool called DVC is designed to do. This week on the show, David Amos is here and he&#x27;s brought another batch of PyCoder’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>Editing Excel Spreadsheets in Python With openpyxl</title>
      <id>https://realpython.com/courses/editing-excel-python-openpyxl/</id>
      <link href="https://realpython.com/courses/editing-excel-python-openpyxl/"/>
      <updated>2020-09-01T14:00:00+00:00</updated>
      <summary>In this course, you&#x27;ll learn how to handle spreadsheets in Python using the openpyxl package. You&#x27;ll learn how to manipulate Excel spreadsheets, extract information from spreadsheets, create simple or more complex spreadsheets, including adding styles, charts, and so on.</summary>
      <content type="html">
        &lt;p&gt;Excel spreadsheets are one of those things you might have to deal with at some point. Either it&amp;rsquo;s because your boss loves them or because marketing needs them, you might have to learn how to work with spreadsheets in Python, and that&amp;rsquo;s when knowing &lt;code&gt;openpyxl&lt;/code&gt; comes in handy!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this course, you&amp;rsquo;ll learn how to use openpyxl to:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Read&lt;/strong&gt; Excel spreadsheets and iterate through the data&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Manipulate&lt;/strong&gt; speadsheet data using Python data structures&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Create&lt;/strong&gt; simple or more complex spreadsheets&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Format&lt;/strong&gt; workbooks using styles, filters, and conditional formatting&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Enhance&lt;/strong&gt; spreadsheets by adding images and charts&lt;/li&gt;
&lt;/ul&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast – Episode #24: Options for Packaging Your Python Application: Wheels, Docker, and More</title>
      <id>https://realpython.com/podcasts/rpp/24/</id>
      <link href="https://realpython.com/podcasts/rpp/24/"/>
      <updated>2020-08-28T12:00:00+00:00</updated>
      <summary>Have you wondered, how should I package my Python code? You&#x27;ve written the application, but now you need to distribute it to the machines it&#x27;s intended to run on. It depends on what the code is, the libraries it depends on, and with whom do you want to share it. This week on the show we have Itamar Turner-Trauring, creator of the website pythonspeed.com. We discuss his article &quot;Options for Packaging Your Python Code: Wheels, Conda, Docker, and More,&quot; covering the how of sharing your code.</summary>
      <content type="html">
        &lt;p&gt;Have you wondered, how should I package my Python code? You&#x27;ve written the application, but now you need to distribute it to the machines it&#x27;s intended to run on. It depends on what the code is, the libraries it depends on, and with whom do you want to share it. This week on the show we have Itamar Turner-Trauring, creator of the website pythonspeed.com. We discuss his article &quot;Options for Packaging Your Python Code: Wheels, Conda, Docker, and More,&quot; covering the how of sharing your code.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Django Redirects</title>
      <id>https://realpython.com/courses/django-redirects/</id>
      <link href="https://realpython.com/courses/django-redirects/"/>
      <updated>2020-08-25T14:00:00+00:00</updated>
      <summary>In this course, you&#x27;ll learn everything you need to know about HTTP redirects in Django. All the way from the low-level details of the HTTP protocol to the high-level way of dealing with them in Django.</summary>
      <content type="html">
        &lt;p&gt;When you build web applications in Python using the &lt;a href=&quot;https://www.djangoproject.com/&quot;&gt;Django framework&lt;/a&gt;, you&amp;rsquo;ll likely need to redirect the user from one URL to another. This course covers what you need to know about redirecting in Django. All the way from the low-level details of the HTTP protocol to the high-level way of dealing with them in Django.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;By the end of this course you&amp;rsquo;ll learn:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;How &lt;strong&gt;HTTP Redirects&lt;/strong&gt; work&lt;/li&gt;
&lt;li&gt;The difference between &lt;strong&gt;temporary&lt;/strong&gt; and &lt;strong&gt;permanent&lt;/strong&gt; redirects&lt;/li&gt;
&lt;li&gt;How to use &lt;strong&gt;query strings&lt;/strong&gt; with a redirect&lt;/li&gt;
&lt;li&gt;How to &lt;strong&gt;avoid common problems&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast – Episode #23: Python Wheels and Pass by Reference in Python</title>
      <id>https://realpython.com/podcasts/rpp/23/</id>
      <link href="https://realpython.com/podcasts/rpp/23/"/>
      <updated>2020-08-21T12:00:00+00:00</updated>
      <summary>Have you wondered what are Python wheels? How are they used to package Python code? Does Python use pass by value or pass by reference? This week on the show, David Amos is here to help answer these questions, and he has brought another batch of PyCoder’s Weekly articles and projects.</summary>
      <content type="html">
        &lt;p&gt;Have you wondered what are Python wheels? How are they used to package Python code? Does Python use pass by value or pass by reference? This week on the show, David Amos is here to help answer these questions, and he has brought another batch of PyCoder’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>Real Python Office Hours</title>
      <id>https://realpython.com/courses/office-hours/</id>
      <link href="https://realpython.com/courses/office-hours/"/>
      <updated>2020-08-18T14:00:00+00:00</updated>
      <summary>The Real Python Office Hours is a weekly hangout where members of Real Python get the chance to interact with each other as well as Real Python authors and video course instructors. Join us live on Wednesday mornings!</summary>
      <content type="html">
        &lt;p&gt;The &lt;a href=&quot;https://realpython.com/office-hours&quot;&gt;Real Python Office Hours&lt;/a&gt; is a weekly hangout where members of Real Python get the chance to meet fellow Pythonistas to chat about your learning progress, ask questions, and discuss Python tips &amp;amp; tricks via screen sharing.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this video course, you can:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;View previous office hours meetings&lt;/li&gt;
&lt;li&gt;Download the chat transcript from each meeting&lt;/li&gt;
&lt;li&gt;Explore resources and bonus materials discussed during each meeting&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;alert alert-primary&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong&gt;Office Hours Schedule &amp;amp; Registration:&lt;/strong&gt; Join us live for the next members-only Q&amp;amp;A session with the Real Python Team: &lt;a href=&quot;https://realpython.com/office-hours/&quot;&gt;View upcoming Office Hours events »&lt;/a&gt;&lt;/p&gt;
&lt;/div&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 #22: Create Cross-Platform Python GUI Apps With BeeWare</title>
      <id>https://realpython.com/podcasts/rpp/22/</id>
      <link href="https://realpython.com/podcasts/rpp/22/"/>
      <updated>2020-08-14T12:00:00+00:00</updated>
      <summary>Do you want to distribute your Python applications to other users who don&#x27;t have or even use Python? Maybe you&#x27;re interested in seeing your Python application run on iOS or Android mobile devices. This week on the show we have Russell Keith-Magee, the founder and maintainer of the BeeWare project. Russell talks about Briefcase, a tool that converts a Python application into native installers on macOS, Windows, Linux, and mobile devices.</summary>
      <content type="html">
        &lt;p&gt;Do you want to distribute your Python applications to other users who don&#x27;t have or even use Python? Maybe you&#x27;re interested in seeing your Python application run on iOS or Android mobile devices. This week on the show we have Russell Keith-Magee, the founder and maintainer of the BeeWare project. Russell talks about Briefcase, a tool that converts a Python application into native installers on macOS, Windows, Linux, and mobile devices.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Identify Invalid Python Syntax</title>
      <id>https://realpython.com/courses/identify-invalid-syntax/</id>
      <link href="https://realpython.com/courses/identify-invalid-syntax/"/>
      <updated>2020-08-11T14:00:00+00:00</updated>
      <summary>In this video course, you&#x27;ll see common examples of invalid syntax in Python and learn how to resolve the issue. If you&#x27;ve ever received a SyntaxError when trying to run your Python code, then this is the guide for you!</summary>
      <content type="html">
        &lt;p&gt;Python is known for its simple syntax. However, when you&amp;rsquo;re learning Python for the first time or when you&amp;rsquo;ve come to Python with a solid background in another programming language, you may run into some things that Python doesn&amp;rsquo;t allow. If you&amp;rsquo;ve ever received a &lt;strong&gt;&lt;code&gt;SyntaxError&lt;/code&gt;&lt;/strong&gt; when trying to run your Python code, then this guide can help you. Throughout this course, you&amp;rsquo;ll see common examples of invalid syntax in Python and learn how to resolve the issue.  &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;By the end of this course, you&amp;rsquo;ll be able to:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Identify &lt;strong&gt;invalid syntax&lt;/strong&gt; in Python&lt;/li&gt;
&lt;li&gt;Make sense of &lt;strong&gt;SyntaxError&lt;/strong&gt; tracebacks&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Resolve&lt;/strong&gt; invalid syntax or prevent it altogether&lt;/li&gt;
&lt;/ul&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast – Episode #21: Exploring K-means Clustering and Building a Gradebook With Pandas</title>
      <id>https://realpython.com/podcasts/rpp/21/</id>
      <link href="https://realpython.com/podcasts/rpp/21/"/>
      <updated>2020-08-07T12:00:00+00:00</updated>
      <summary>Do you  want to learn the how and when of implementing K-means clustering in Python? Would you like to practice your pandas skills with a real-world project? This week on the show, David Amos is back with another batch of PyCoder’s Weekly articles and projects.</summary>
      <content type="html">
        &lt;p&gt;Do you  want to learn the how and when of implementing K-means clustering in Python? Would you like to practice your pandas skills with a real-world project? This week on the show, David Amos is back with another batch of PyCoder’s Weekly articles and projects.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  

</feed>
