Part 2 · Section 14
Python Updates
Python keeps evolving. This section collects the most useful changes from Python 3.7 through 3.10 (structural pattern matching, assignment expressions, the dictionary merge operators, new string methods and more), plus notes on later releases. The site runs Python 3.13, so every example here works as-is.
- Python 3.10: structural pattern matching (
match/case), better error messages,zip(strict=True) - Python 3.9: dictionary union operators,
str.removeprefix/removesuffix, built-in generic types likelist[int] - Python 3.8: assignment expressions (the “walrus” operator
:=) - Python 3.8 and 3.7: positional-only parameters, f-string
=debugging, and other highlights