Writing Idiomatic Python
Like Duolingo, but for Writing Idiomatic Python. Tomo turns the whole topic into a game you play five minutes a day, until it actually sticks.
For the part of you with thirty open tabs that never became anything.
26 levels across 4 sections, about 52 minutes end to end, roughly 10 days at five minutes a day. It moves through Writing Expressive Code, Structuring Data and Objects, Controlling Execution Flow, and Understanding the Runtime. It assumes you already know the basics.
Free forever · No credit card · iPhone & Android

Key ideas in Writing Idiomatic Python
- Square brackets produce a list comprehension preserving order and duplicate items.
- Braces without a colon construct a set comprehension that discards duplicates.
- Braces with a colon construct a dictionary comprehension from paired elements.
- A trailing if clause filters items before passing them to the output expression.
- A leading if-else ternary expression transforms each item without changing list length.
- Comprehension trailing filters discard non-matching items without requiring an else.
- The walrus operator := assigns an expression to a name inside an inline condition.
- Binding in the filter clause lets the leading expression reuse the result for free.
- Assignment expressions avoid calling expensive functions twice per iteration.
- Nested comprehension for clauses read in the same outer-to-inner order as loops.
- The outer iterable loop must appear before the inner collection variable it unpacks.
- Optional filter clauses evaluate after the innermost loop clause they constrain.
- A starred variable in Python unpacking always absorbs surplus items into a list.
- Python permits only one starred expression per assignment target.
- Unstarred targets at both ends capture exactly one item before and after the star.
- Loop variable targets mirror the nested tuple or list layout of each yielded item.
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 Writing Idiomatic Python 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.
What happens when you use curly braces without a colon in `{x for x in items}`?
Get it right to open this lesson and 25 more in the app.
Where Writing Idiomatic Python takes you
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.
- 1
Writing Expressive Code
- Data Transformations with Comprehensions
- Structural Unpacking and Pattern Matching
- Specialized Collections from the Standard Library
- 2
Structuring Data and Objects
- Modern Class Design with Dataclasses and Dunders
- Attribute Access and Encapsulation
- 3
Controlling Execution Flow
- Memory-Efficient Streaming with Generators
- Deterministic Cleanup with Context Managers
- Metaprogramming with Function Decorators
- 4
Understanding the Runtime
- The Object Model, Scopes, and Memory
4 sections · 9 units · 26 levels. Built to play, not to enroll.
You pick the voice
Writing Idiomatic Python is taught in the Explain Like I'm 5 style: no big words. promise.. 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
The Frontend Execution Engine
Master the invisible mechanics of the browser and React reconciler to build high-performance, scalable web applications.
AI Native Engineering
Build professional software from scratch using AI agents, even if you've never written a line of code. Learn to think like an architect and use the machine as your master craftsman.
JavaScript Context and Object-Oriented Patterns
Master the most misunderstood keyword in JavaScript. Learn to control execution context, architect robust class hierarchies, and navigate the nuances of prototype-based inheritance.
Systems Analysis and Design
Learn to bridge the gap between business needs and technical solutions by mastering the art of designing robust, scalable software systems.
Building Your Life with AI
Move beyond basic chat prompts to build custom workflows, automate your side projects, and turn AI into a specialized partner for your unique goals.
Practical AI and Prompt Workflows
Move beyond conversational chat to use language models as analytical engines and structured workflow partners. Learn prompt architecture, token mechanics, schema extraction, and tool integration.
Start Writing Idiomatic Python today.
Download Tomo, search Writing Idiomatic Python, and play your first lesson in under a minute.