Mike

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 101 – An Intro to Jupyter Notebook

The Jupyter Notebook is an open-source web application that allows you to create and share documents that contain code, equations, visualizations, and formatted text. By default, Jupyter Notebook runs Python out of the box. Additionally, Jupyter Notebook supports many other programming languages via extensions. You can use the Jupyter Notebook for data cleaning and transformation,

Python 101 – An Intro to Jupyter Notebook Read More »

Python 3.10 – Simplifies Unions in Type Annotations

Python 3.10 has several new typing features. They are given in detail here: PEP 604, Allow writing union types as X | Y PEP 613, Explicit Type Aliases PEP 612, Parameter Specification Variables The focus of this tutorial is to talk about PEP 604, which makes writing union types easier when adding type annotation (AKA:

Python 3.10 – Simplifies Unions in Type Annotations Read More »