Archives · Page 5 of 5
Browse all articles in reverse chronological order.
2026-11
Regular Expressions in Python
How search, match, findall and sub actually differ, the metacharacters you need, greedy versus lazy quantifiers, named groups, compile flags, and the failure modes that make regexes fragile.
Python Standard Library Essentials: datetime, collections and json
The standard library modules worth knowing by heart: datetime arithmetic and time zones, Counter, defaultdict and deque, json round-trips, plus os.getenv, subprocess and secrets.
Python Strings, Slicing and Formatting
Create and inspect strings, use the methods you actually reach for, format output with f-strings, and keep str and bytes straight at the encoding boundary.
Testing Python with pytest
Write your first pytest test, then use plain asserts, pytest.raises, parametrize, fixtures and tmp_path — plus how to organise tests and the anti-patterns that make a suite untrustworthy.
Python Tuples, Sets and Immutability
When a tuple beats a list, how packing and unpacking work, what immutability actually prevents, and why sets give O(1) membership tests.
What Is an AI Agent
Break down the observe-decide-act loop behind AI agents, how they differ from chat and scripts, and when you should not use one.
Python Variables and Data Types
How Python variable binding actually works, the built-in types you use daily, and why mutable vs immutable changes how bugs show up.