Specific features
Abstract Syntax Trees
- How to use Abstract Syntax Trees (AST) to understand code
 - Learn Python ASTs, by building your own linter
 - Abstract Syntax Trees in Python
 
Async and concurrency
- Async IO in Python: A Complete Walkthrough
 - Async Python in real life
 - Python Concurrency — Threads, Processes, and asyncio Explained
 - Concurrency and async / await — asynchronous code, concurrency, and parallelism
 - Basics of concurrency — concurrency landscape, APIs, docs, books, and glossary
 - Python Concurrency: The Tricky Bits
 - Speed Up Your Python Program With Concurrency — threading, asyncio, and multiprocessing
 
Classes
- The Power of Object-Oriented Programming
 - stackoverflow: When should I be using classes in Python?
 - What Are Python Data Classes?
 - The Inner Workings of Python Dataclasses Explained
 - Inheritance vs Composition
 - Working With Classes in Python
 
Command line applications
- Python docs HOWTOs: Argparse Tutorial
 - click — creating beautiful command line interfaces in a composable way with as little code as necessary
 - Rich — make your command line applications visually appealing and present data in a more readable way
 - Textual — Text User Interface framework for Python inspired by modern web development
 
Context managers
- The Magic of Python Context Managers
 - Python with Context Managers
 - Creating a context manager in Python
 - Context Managers — text and video tutorial
 
CPython internals
- Python behind the scenes — CPython virtual machine, how CPython compiles a program, main parts of the interpreter, etc
 - CPython Object System Internals: Understanding the Role of PyObject — understand how objects are implemented in CPython and how CPython emulates Inheritance and Polymorphism in C using struct embedding
 
Decorators and closures
- stackoverflow: Decorators demystified
 - Decorator pattern in Python
 - All About Decorators in Python
 - Decorator library
 - Python Inner Functions: What Are They Good For?
 - Solving Logic Problems with Python Decorators
 - Python functions: a complete reference
 
Exception handling
- Python docs: Errors and Exceptions
 - Handling exceptions in Python like a PRO
 - Guide to Error Handling in Python
 - Exceptions And Errors — text and video tutorial
 
Iterables, Generators, Yield, Itertools
- stackoverflow: What does the yield keyword do? — also explains iterables and generators
 - Yield and Generators Explained
 - How to make an iterator in Python
 - Python docs: itertools — functions creating iterators for efficient looping
 - Itertools Hacks — Avoiding nested loops, Infinite loop with a count, etc
 - Page iterator in Python
 - Intricate interleaved iteration — is there any reason to use a Python generator if I need to store all the values anyway?
 
Lambda
- A Guide to Python Lambda Functions
 - calmcode.io: lambda — video, includes usage in 
pandas - Yet Another Lambda Tutorial
 
Lists and comprehensions
- stackoverflow: Slice notations and assignments
 - A Comprehensive Guide to Slicing in Python
 - List comprehensions explained visually
 - Comprehensions in Python the Jedi way
 - calmcode.io: comprehensions — video
 - stackoverflow: How to copy 1-D and multi-D lists
 - Python docs: collections — container datatypes
 
Logging
- Python docs HOWTOs: Logging
 - Python docs: Logging Cookbook
 - Logging in Python like a PRO
 - Application Logging in Python: Recipes for Observability
 
Memoization
- Memoization in Python
 - Python docs: functools.lru_cache
 - stackoverflow: What is memoization and how can I use it in Python?
 
OS interaction
- stackoverflow: How to execute a program or call a system command from Python?
 - stackoverflow: difference between subprocess and os.system
 - stackoverflow: How to use subprocess command with pipes?
 - stackoverflow: when should shell=True be avoided?
 - stackoverflow: How to iterate over files in a given directory?
 - Python pathlib Cookbook: 57+ Examples to Master It
 - pathlib module: taming the file system
 
Pattern matching
- Pattern matching tutorial for Pythonic code
 - PEP 636: Structural Pattern Matching Tutorial
 - Structural Pattern Matching in Python
 
Profiling code and speeding up Python
- Python docs: deterministic profiling of Python programs
 - Speed up your code
 - Profiling and Analyzing Performance of Python Programs
 - stackoverflow: How can you profile a Python script?
 - Easy speedup wins with Numba
 - How Numba and Cython speed up Python code
 - cProfile recipe with pstats
 
Python Packaging
- Packaging Python Projects — walks you through how to package a simple Python project
 - stackoverflow: What is setup.py?
 - Packaging and Distribution
 - How to create a Python package in 2022
 - Comprehensive guide to Python project management and packaging — what was used before, why it needed to change, and how the changes provided by the PEPs solved the issues
 - Publishing Python Packages — book covering how to create masterful, maintainable Python packages, includes pro tips for design, automation, testing, deployment, etc
 
Regular Expressions
- Understanding Python re(gex)? — my book on regular expressions, covers built-in 
reand third-partyregexmodules- Interactive app with 100+ regex exercises — based on practice problems from my book
 - PyRegexPlayground — interactive playground for Python Regular Expressions
 - Python regular expression cheatsheet — my blog post, includes examples as well
 
 - regex101 — visual aid and online testing tool for regular expressions, select flavor as Python before use
 - debuggex — railroad diagrams for regular expressions, select flavor as Python before use
 - Awesome Regex — curated collection of regex tools, tutorials, libraries, etc
 
Socket Programming
Standard library
- PyMOTW-3 — how to use the modules of the Python standard library
 - Python Standard Library changes in recent years
 
Type annotations
Virtual Environments
On newer versions of Python, I use the simple commands shown below to create a new virtual environment. This approach should work out-of-the-box, but might depend upon the OS you are using. I'm on Linux.
# this is needed only once
# 'new_project' is the name of the folder, can be new or already existing
# use py instead of python3.13 for Windows
$ python3.13 -m venv new_project
$ cd new_project/
$ source bin/activate
(new_project) $ # pip install <modules>
(new_project) $ # do some scripting
(new_project) $ deactivate
$ # you're now out of the virtual environment
Here's some resources on this messy topic: