Idiomatic Python: Beyond the Basics
Bridge the gap between writing scripts that merely run and designing clean, expressive, and efficient Python programs. Master the standard library's most powerful tools, leverage the underlying object model, and confidently implement advanced patterns like decorators, generators, and concurrency.
Like Duolingo, but for Idiomatic Python: Beyond the Basics. Tomo turns the whole topic into a game you play five minutes a day, until it actually sticks.
29 levels across 4 sections, about 58 minutes end to end, roughly 12 days at five minutes a day. It moves through Writing Expressive, Idiomatic Code; Designing with the Python Data Model; Control Flow, State, and Metaprogramming; and Concurrency and Runtime Mechanics. It assumes you already know the basics.
Free forever · No credit card · iPhone & Android

Key ideas in Idiomatic Python: Beyond the Basics
- The starred expression *var captures variable-length elements between named targets as a list.
- Extended sequence unpacking matches positions from both ends simultaneously around the starred target.
- Structural unpacking eliminates hardcoded numeric indices that break when row layouts shift.
- enumerate accepts a start parameter to offset index counters without manual arithmetic.
- zip pairs elements across iterables until the shortest stream is exhausted.
- zip with strict=True raises a ValueError if iterables have unequal lengths.
- Dictionary comprehensions evaluate key: value expressions directly from iterable items.
- Comprehensions eliminate boilerplate accumulator initializations and repeated .append() or key-assignment calls.
- Comprehensions evaluate at C-speed in standard CPython by bypassing repeated method attribute lookups.
- A trailing 'if' clause filters elements out of the sequence entirely.
- A leading 'x if cond else y' expression modifies values but cannot change the count of elements.
- Using 'if' without an 'else' before the 'for' keyword is invalid Python syntax.
- A negative step in a slice steps backwards through sequences at native C-level speed.
- Omitting start and stop bounds with a negative step implies scanning the entire sequence from end to beginning.
- String slicing directly produces a new string, avoiding the intermediate iterator and join required by reversed().
- A standard Python dict raises KeyError if you try to append to a key before creating it.
You've tried the other tabs
Thirty open tabs. Four facts you actually kept.
You watched. You nodded. By Sunday it was gone.
One answer, then back to scrolling.
Eight weeks. You meant to finish. You didn't.
Tomo gives Idiomatic Python: Beyond the Basics the Duolingo treatment: levels, streaks, and quick quizzes that test what you just learned. That game loop is what the tabs above never had, so it's the one you actually finish.
Here's what playing it feels like
A real question from this course. Take your best guess.
When you write `first, *middle, last = items`, how does Python assign the values?
Get it right to open this lesson and 28 more in the app.
Where Idiomatic Python: Beyond the Basics takes you
- 1
Writing Expressive, Idiomatic Code
- Expressive Refactoring with Python Idioms
- Specialized Containers with the Collections Module
- 2
Designing with the Python Data Model
- Leveraging Special Methods and Protocols
- Attributes, Properties, and Class Mechanics
- 3
Control Flow, State, and Metaprogramming
- Iterators, Generators, and Stream Processing
- Closures and Function Decorators
- Resource Management with Context Managers
- 4
Concurrency and Runtime Mechanics
- Concurrency Paradigms: Threads, Processes, and Async
- Python's Memory Model and Runtime Plumbing
4 sections · 9 units · 29 levels. Built to play, not to enroll.
Tomo is in ChatGPT
Tomo is also a ChatGPT plugin: the same playable courses, built and played inside your chat.
Add Tomo to ChatGPT- What to ask
- “Make me a Tomo course on black holes.” “Turn this chat into a Tomo course.”
- What you get
- Quick questions with instant feedback, hearts and stars, ready to play in about a minute.
- Where it goes
- No sign-up to start. Connect your Tomo account and your streak carries on in the app.
You pick the voice
Idiomatic Python: Beyond the Basics is taught in the Professor style: clear, structured, thorough. Want a different feel? In the app you can spin up the same topic in any of Tomo's teaching styles. Same facts, totally different vibe.
More Technology on Tomo
Writing Idiomatic Python
Transform clunky, procedural script code into elegant, maintainable Python. Master lazy evaluation, function ergonomics, context managers, and the native data model.
Writing Idiomatic Python
Bridge the gap between working code and clean, Pythonic engineering. Learn to write expressive data transforms, robust object models, memory-efficient streams, and reusable decorators.
Python in Practice
Bridge the gap between basic syntax and professional Python. Learn to write clean, idiomatic code while dodging common traps in memory, mutability, and error handling.
C++: Code, Memory, and Control
Learn how C++ bridges human-readable logic and direct hardware control. Write and compile your first programs, manipulate dynamic data collections, and understand how memory references keep your software fast and crash-free.
Writing Reliable C++
Learn to write fast, correct C++ programs from your very first line of code. Build a practical mental model of variables, functions, and objects, and discover how modern C++ manages memory safely without the headaches of legacy code.
C++: Foundations and Pitfalls
Build a robust mental model of C++ from your first program to complex systems. Uncover the subtle language traps and memory quirks that catch even experienced programmers.
Start Idiomatic Python: Beyond the Basics today.
Download Tomo, search Idiomatic Python: Beyond the Basics, and play your first lesson in under a minute.