intermediate

These tutorials are for developers who already understand the basics of Python and they would like to expand their knowledge

The Functools Module (PyCharm Webinar)

Are you ready to power up your Python skills? The Python programming language has more than 200 modules in its standard library. In this tutorial, you will learn about functools, a module that is tailor-made for acting on or returning other modules. You will learn about how to use functool decorators effectively, caching, function overloading …

The Functools Module (PyCharm Webinar) Read More »

How to Create a Command-line Application with argparse

When you are creating an application, you will usually want to be able to tell your application how to do something. There are two popular methods for accomplishing this task. You can make your application accept command-line arguments or you can create a graphical user interface. Some applications support both. Command-line interfaces are helpful when …

How to Create a Command-line Application with argparse Read More »

A Tour of Python’s itertools Library

Python provides a great module for creating your own iterators. The module I am referring to is itertools. The tools provided by itertools are fast and memory efficient. You will be able to take these building blocks to create your own specialized iterators that can be used for efficient looping. In this article, you will …

A Tour of Python’s itertools Library Read More »

How to Override a List Attribute’s Append() Method in Python

I had a use-case where I needed to create a class that had an attribute that was a Python list. Seems simple, right? The part that made it complicated is that I needed to do something special when anything was appended to that attribute. Watching for attribute changes don’t work the same way for lists …

How to Override a List Attribute’s Append() Method in Python Read More »

Python 101 – How to Create a Graphical User Interface

When you first get started as a programmer or software developer, you usually start by writing code that prints to your console or standard out. A lot of students are also starting out by writing front-end programs, which are typically websites written with HTML, JavaScript and CSS. However, most beginners do not learn how to …

Python 101 – How to Create a Graphical User Interface Read More »

Python 101 – How to Generate a PDF

The Portable Document Format (PDF) is a very popular way to share documents across multiple platforms. The goal of the PDF is to create a document that will look the same on multiple platforms and that will print the same (or very similar) on various printers. The format was originally developed by Adobe but has …

Python 101 – How to Generate a PDF Read More »

Python 101 – Assignment Expressions

Assignment expressions were added to Python in version 3.8. The general idea is that an assignment expression allows you to assign to variables within an expression. The syntax for doing this is: NAME := expr This operator has been called the “walrus operator”, although their real name is “assignment expression”. Interestingly, the CPython internals also …

Python 101 – Assignment Expressions Read More »

Python’s with Statement and Context Managers

Python came out with a special new keyword several years ago in Python 2.5 that is known as the with statement. This new keyword allows a developer to create context managers. But wait! What’s a context manager? They are handy constructs that allow you to set something up and tear something down automatically. For example, …

Python’s with Statement and Context Managers Read More »