Business days between two dates with nothing but datetime and a list comprehension.
Notes on Python, one small script at a time.
Business days between two dates with nothing but datetime and a list comprehension.
Two patterns worth memorizing — and the advice to stop before the pattern becomes a second program.
Stop gluing path strings together by hand. A tour of the object-oriented way to move, rename, and sort files.
A real database, zero setup. CRUD with the ? placeholders that keep your data honest.
A folder for everything, dry-run included, name collisions handled.
API keys out of your source code and into a file git never sees.
The one rule that cleans up most exception handling, plus the bare-except trap.
Capture output, fail loudly, and skip the shell-string foot-guns.
cron, Task Scheduler, sleep-loops, sched, APScheduler — and when each one is the right answer.
From brute force to clean, with a dry-run version you can actually trust.
One assert, one command, and the habit that follows.
Delete your boilerplate. Nobody gets hurt.
From sys.argv[1] to flags and a --help page you didn't have to write.
The upgrade that pays for itself the first time something breaks at 3am.
Counter, defaultdict, deque, namedtuple — small tools, outsized payoffs.
The calls you'll actually make, including the timeout argument people forget.
Readable, mergeable, diffable — config as data instead of constants.
DictReader, DictWriter, and the newline='' fix for Windows blank lines.
Two projects, one machine, zero dependency wars.
scp, venv, cron, logs — five mistakes I made so your script doesn't have to.
A complete, runnable build — every beginner concept used once, end to end.
Installing, listing, uninstalling — and the fix for the too-many-packages problem.
One small class, self explained plainly, and when a class is overkill.
That red wall of text isn't scolding you — it's a map. How to find the "what" and the "where" in three seconds.
Wrap the risky line, catch the specific error, keep the program alive.
== compares values, is compares identity — and None sits right on the fault line.
Looping with .items(), defaults with .get(), and your first KeyError.
A loop translated into one honest line — and when to translate it back.
The workhorse methods you'll use every single day, plus f-strings.
The with-block, the three modes, and a notes file that survives the process.
The standard library as a toolbox — and your own files as modules.
def, parameters, returns — and the confusion that costs every beginner an afternoon.
Repetition without copy-paste: enumerate, break, and the off-by-one habit.
Comparisons, elif chains, and the truthiness of empty things.
A decision table instead of memorization.
Names are labels — and your first TypeError is a rite of passage.
Comments are letters to your future self. Write them like it.
hello.py, the Run button, and the terminal — two ways to start a habit.
The installer, the checkbox, and the Microsoft Store trap.
An honest scope: what it's great at, what it isn't, and why that matters.