pytudes: Peter Norvig's Python practice notebooks
pytudes is worth opening once you already know Python syntax and want to see how a skilled programmer attacks a genuinely hard problem — not another beginner course. No hand-holding here. The notebooks read like reference solutions: dense, occasionally clever, sometimes commented and sometimes not, and a few newer ones pit a human's Project Euler answer against an LLM's. Treat it as reading material, not a package to import.
What pytudes is and where it comes from
pytudes is Peter Norvig's collection of Python Jupyter notebooks, each built around one hard practice problem rather than a tutorial topic. The name comes from the musical étude — a short piece meant to perfect a single skill — and the README frames the project for people who treat programming like learning an instrument, not like pressing play on an app. It's released under the MIT licence.
What the collection covers
- ✓Six loose categories: Programming Examples, Advent of Code and Project Euler, Probability and Uncertainty, Logic and Number/Counting Puzzles, Word Puzzles, and a running 'New' section for whatever Norvig posted most recently.
- ✓A Lisp interpreter written in Python (lispy.ipynb) sits next to the puzzle notebooks — the collection isn't limited to numeric puzzles.
- ✓Project Euler problems 1-100 appear in five separate notebooks: one worked by Norvig himself, and four more where the Fable, Kimi, or Opus LLM solves the same set, so you can compare a human's code to a model's.
- ✓Advent of Code notebooks run from 2016 through 2025, plus a 2025 'AI LLM Edition' variant and a shared AdventUtils notebook of helper code.
- ✓Classic logic puzzles get their own thread — Sudoku, with a 2021 Java rewrite titled '200,000 puzzles/second in Java', plus KenKen, three separate Cheryl's Birthday notebooks, and xkcd's Regex Golf.
- ✓Every notebook links straight to Colab or nbviewer from the README table, so you can open one without cloning the repo.
Who uses pytudes and how
- •Working programmers who want deliberate practice open one notebook, read Norvig's approach before peeking at the code, then try solving the same problem cold in their own notebook.
- •Competitive programmers preparing for Advent of Code or Project Euler use the matching year's notebook as a model solution to compare against after submitting their own answer.
- •Anyone curious about LLM coding ability reads the paired Euler notebooks — Euler.ipynb next to Euler-Fable.ipynb, Euler-Kimi.ipynb, and Euler-Opus.ipynb — to see the same 100 problems solved by a human and by three different models.
- •Instructors and self-learners pull individual notebooks like Cryptarithmetic or Sudoku as standalone case studies in problem decomposition, since each one stands on its own rather than fitting a numbered course.
Strengths
- ✓Written and maintained by Norvig himself, not scraped or crowd-sourced — every notebook is one person's actual worked solution.
- ✓Real breadth of subject matter: numeric puzzles, word games, probability simulations, and even a Lisp interpreter, not just one flavor of practice problem.
- ✓The paired human-vs-LLM Euler notebooks are a genuinely unusual angle most practice collections don't offer.
- ✓Every notebook is one click from Colab or nbviewer, so you can start reading or running code with zero local setup.
What pytudes is not
- △Not a course: no exercises, no progression, no answer-key structure — you read Norvig's finished solution, not a scaffolded lesson.
- △The README gives no install or environment instructions beyond opening a notebook in Colab or nbviewer; there's no documented dependency list.
- △Notebook age spans decades (some from 2006, others from 2026) and commenting style varies, so clarity isn't consistent from one notebook to the next.
- △Assumes real Python fluency already; it isn't clearly documented as beginner material, and problems like Beal's Conjecture or cryptarithmetic expect comfort with algorithms and math notation.
Other python practice collections
Common questions about pytudes
pytudes is free to read and reuse under the MIT licence, the permissive terms GitHub lists for the repository. You can view, copy, and adapt any notebook without asking permission, as long as you keep the licence notice.
pytudes covers Project Euler and Advent of Code solutions, probability simulations, logic puzzles like Sudoku and KenKen, word puzzles like Boggle and Regex Golf, and general programming examples such as Conway's Game of Life and a Lisp interpreter written in Python.
pytudes notebooks open directly in your browser — the README links each one to Colab or nbviewer so you can read or run it without installing anything locally. Cloning the repo is only needed if you want to edit and save your own copy.
pytudes is not clearly aimed at beginners — the README itself contrasts it with tutorials that just get you running code fast, and the notebooks assume you can already read and write Python before you start. Absolute beginners will likely find the puzzles hard to follow.
pytudes is organized by topic, not difficulty, into groups such as Advent of Code and Project Euler, Probability and Uncertainty, Logic and Number/Counting Puzzles, and Word Puzzles, plus a running 'New' section for recent additions.
pytudes is released under the MIT licence, as stated in the repository, which permits reuse, modification, and redistribution of the notebooks as long as the licence notice is kept.
Who should try it — and who should skip
Try pytudes once you can already write working Python and want to see a skilled programmer's approach to hard, self-contained problems — Advent of Code veterans, Project Euler solvers, or anyone curious how an LLM's Euler solution compares to Norvig's own. Skip it if you're still learning basic syntax and control flow; there's no scaffolding here, no exercises building on each other, and no beginner path — just finished notebooks that assume you can already read code.
Related repositories
Still deciding about pytudes?
One click hands the question to an AI along with this page — see what it says about pytudes.
