Skip to content

Advent of Code 2026 Day 0: Preparations

At some point in my Advent of Code activities, I noticed Peter Norvig created a set of helper functions to be reused for each year's contest. I liked the idea, so I used some of his functions, and created others of my own. The 2026 version is below. The parse function is particularly handy for dealing with a wide variety of input files. advent.py also imports a number of standard Python functions for re-exporting for convenience.

Source

advent.py

advent_test.py

End