python
Taming Text with Python's re Module: A Practical Guide to Regular Expressions
Regular expressions look intimidating, but Python's re module makes them approachable. Here is a practical tour of matching, groups, and compiled patterns.
python
Regular expressions look intimidating, but Python's re module makes them approachable. Here is a practical tour of matching, groups, and compiled patterns.
python
Learn how pathlib replaces the clunky os.path string-juggling with clean, object-oriented file paths — building paths, globbing, reading and writing files, and the pitfalls to avoid.
python
Learn how Pydantic v2 turns type hints into runtime validation: models, custom validators, nested data, serialization, and settings management — with runnable examples and common pitfalls.
python
Learn how Python's dunder methods work under the hood: write useful __repr__ and __eq__ implementations, overload operators safely with NotImplemented, support len() and iteration, and know when operator overloading is a bad idea.
python
Stop guessing why your Python code is slow. Learn to time snippets correctly with timeit, find hot functions with cProfile and pstats, track memory with tracemalloc, and avoid the classic benchmarking mistakes that lead to optimizing the wrong thing.
python
Learn how Python's json module really works: pretty-printing and compact output, serializing datetimes, Decimals, and dataclasses with custom encoders, precise decoding with parse_float and object_hook, and the type-mapping gotchas that bite in production.
python
Learn how Python generators work under the hood — from the yield keyword and generator expressions to building lazy data pipelines that process gigabytes of data in constant memory.
Python tutorials that go beyond the basics - deep dives into the standard library, testing, typing, and async, plus weekly Python news.
This week in Python: PSF Board and inaugural Packaging Council elections kick off, the ChocoPoC RAT targets researchers via fake GitHub PoC repos, Python 3.15 nears its release candidate phase, and EuroPython and SciPy 2026 both start July 13.
Learn how to use Python's built-in sqlite3 module like a pro: parameterized queries, transactions, Row factories, bulk inserts, WAL mode, and the pitfalls that trip up even experienced developers.
Exception handling separates robust Python programs from fragile scripts. A practical tour of try/except/else/finally, custom exception hierarchies, chaining, and the patterns that keep failures debuggable.
Learn how to run external commands from Python the right way: subprocess.run() essentials, capturing output, handling errors and timeouts, streaming with Popen, building pipelines, and avoiding the shell=True injection trap.
Python 3.14.6 (released June 10, 2026) is a maintenance update with nine security fixes — including patches for CVE-2026-45186 and the completion of CVE-2021-4189 — plus OpenSSL 3.5.7, pip 26.1.2, and numerous crash and free-threading fixes.
Learn how to run work in parallel with Python's concurrent.futures — when to reach for threads vs. processes, how to use ThreadPoolExecutor and ProcessPoolExecutor, and how to handle results, exceptions, and timeouts cleanly.
Learn how to replace fragile magic numbers and string constants with Python's enum module — covering Enum, IntEnum, StrEnum, Flag, auto(), custom methods, aliases, the @unique decorator, and the pitfalls to avoid.
Learn to handle dates and times correctly in Python: naive vs. aware datetimes, converting between time zones with the standard-library zoneinfo, parsing and formatting, safe arithmetic, and the DST pitfalls that bite real applications.
Learn Python's re module from the ground up: search vs. match, groups and named captures, substitution with functions, lookarounds, flags, and the pitfalls that trip up almost everyone.
A steady week in Python: 3.15 reaches beta 3 with its feature set locked, Polars ships 1.42.0, CPython 3.14.6 and 3.13.14 maintenance releases land, recent Django security fixes warrant upgrading, and EuroPython 2026 nears in Kraków.
Go beyond switch statements. Learn how Python's match/case destructures sequences, mappings, and objects — with capture patterns, class patterns, guards, and the pitfalls that trip people up.
Go beyond `assert` and learn pytest the way professionals use it: clean fixtures for setup and teardown, parametrization to kill duplicated tests, and monkeypatch/mock to isolate code from the network and filesystem.