Learning Python from Peter Norvig’s Pytudes: A Master Class in Computational Thinking
Hook
Peter Norvig—an AI researcher—has been publishing his Python problem-solving sessions since 2015, and over 24,000 developers have starred the repository to bookmark his approach to computational thinking.
Context
Most programming resources fall into two camps: beginner tutorials that teach syntax through contrived examples, or production codebases where pedagogical clarity takes a backseat to performance and maintainability. Pytudes occupies a rare third space—a collection of worked examples where an expert programmer thinks aloud while solving genuinely interesting problems.
Peter Norvig created pytudes as the programming equivalent of musical études: short, focused exercises designed to perfect specific skills. Since 2015, he’s published Jupyter notebooks covering everything from Advent of Code challenges to probability simulations to experiments with large language models. Each notebook is self-contained, mixing narrative explanation with executable code, making his decision-making process transparent. For intermediate developers looking to level up their algorithmic thinking and learn idiomatic Python, pytudes offers an apprenticeship model—learning by watching a master craftsperson work.
Technical Insight
The architecture of pytudes is deliberately anti-framework: there’s no shared library, no API to learn, no installation beyond Jupyter. Each notebook stands alone as a complete exploration of a problem. This design choice reflects Norvig’s pedagogical philosophy—the goal isn’t to build reusable components but to demonstrate clear thinking about algorithmic problems.
Consider the “Truncatable Primes” problem from 2026, which explores prime numbers that remain prime when you remove digits. The notebooks demonstrate problem-solving approaches that prioritize clarity and algorithmic thinking over production-ready code.
The Advent of Code notebooks (covering 2024 and 2025) demonstrate parsing complex problem descriptions and translating them into clean data structures. The approach consistently emphasizes readable, concise Python that leverages the language’s expressive features without becoming cryptic.
The 2025 AI notebooks reveal Norvig’s experimental side, documenting his exploration of using LLMs to solve programming challenges. The notebook titled “Advent of Code 2025: AI LLM Edition” examines using large language coding models to solve AoC puzzles. Rather than positioning AI as a replacement for human problem-solving, the notebooks appear to critically examine where LLMs succeed and fail in programming contexts, including prompts, outputs, and commentary on what needed human correction.
What unifies the pytudes collection is the emphasis on problem decomposition. The approach consistently breaks complex problems into small, testable functions with clear contracts, making reasoning visible and debugging straightforward.
Gotcha
Pytudes is explicitly not a course, and that creates frustration for some learners. The README states clearly: “if you think of programming like Spotify: they want to know how to install the app, find a good playlist, and hit the ‘play’ button; after that they don’t want to think about it. There are plenty of other tutorials that will tell you how to do the equivalent of that for various programming tasks—this one won’t help.” There’s no structured difficulty progression—notebooks span from 2015 to 2026 with varying complexity. The notebooks don’t include exercises for you to complete; they’re demonstrations to observe. If you learn best through hands-on practice with immediate feedback, pytudes will feel passive.
The README warns that these are programs “of considerable difficulty” designed for “perfecting particular programming skills”—suggesting they assume substantial background knowledge. The notebooks skew toward algorithmic puzzles and mathematical problems rather than real-world software engineering concerns like API design, error handling, or performance optimization at scale.
Verdict
Use pytudes if you’re an intermediate-to-advanced Python developer preparing for technical interviews, competing in programming challenges, or simply wanting to internalize Pythonic idioms from an expert. It’s particularly valuable if you learn well from worked examples and want exposure to diverse problem domains—the collection includes graph algorithms, probability simulations, natural language processing, and number theory. The recent AI notebooks also offer a pragmatic perspective on LLM-assisted coding. Skip pytudes if you need structured curriculum with progressive difficulty, hands-on exercises, or production-oriented patterns for building deployable systems. As the README states, this is for those who “think of programming like playing the piano—a craft that can take years to perfect”—not for those seeking quick how-to guides. Also skip if you’re still mastering Python fundamentals—start with interactive platforms where you write code and receive feedback, then return to pytudes when you’re ready to study technique rather than syntax.