A bench, not a leaderboard.
This is a practice site for people who already know a little Python and want the part that actually builds skill: writing something, getting it wrong, and being told precisely how. No account, nothing to install, no submissions queue. Python itself runs inside your browser tab.
practicepython.in assumes you can already write a small function
— def, return, an if. If that is not you
yet, pythonmastery.io teaches it from the
beginning, and this will still be here afterwards.
Any practice site can tell you that a test failed. That is the cheap half of the information, and it is the half you already suspected. What you need is the sentence after it.
So the grader here compares what your code actually did against what the case asked
for, and reports the difference in words: that the function fell off the end and returned
None, that the values are right but you built tuples where lists were asked
for, that you quietly emptied the list you were handed, that the two strings differ first
at character seven and it is a capital letter. A failure you cannot explain is a failure
you will write again next week.
Every diagnosis also carries a category, which is what lets the site tell you — twenty exercises later — that mutating the caller’s input has now caught you five times. That report is the real product.
- Write
An empty function, a contract, and cases that argue with you about the edges. The default kind.
- Debug
Code that runs, returns a plausible answer, and is wrong — with the bug report a user filed. The ladder becomes Read, Fix, Extend. Professionals spend more time diagnosing than writing, and almost nothing practices it.
- Refactor
Code that already passes every test and is still not done. The grader reads your syntax tree against rules the exercise declares — loop depth, branch count, names you must use or avoid — so a submission can score 7 out of 7 and the verdict still reads correct, but not yet good.
Each exercise ships a reference solution and a set of wrong answers that people genuinely write. The build runs both through the same grader your browser runs, and refuses to publish the exercise unless the reference passes every case, the starter does not, and every wrong answer still fails and still triggers the specific teaching note it was written to trigger.
That last check is the load-bearing one. It is what stops a change to the grader from quietly turning a real diagnosis back into a bare “incorrect” six months from now. It has caught more mistakes in my own exercises than in anyone else’s code.
Nothing here is timed. The refactor rules are structural, read off the syntax tree, so the same code gets the same verdict on a ten-year-old laptop and a new one.
Every exercise opens on a worked example of the same shape as the problem, then hands you the editor, then unlocks extensions once you pass. Hints come in four rungs, one at a time, from a nudge to nearly-code — asking for one costs you nothing and is recorded nowhere. The published solution is always there, and it is followed by the notes that matter more than the code: why it is written that way, and when not to write it at all.
Prerequisites are shown, never enforced. If you want to start on the hardest thing here, the editor is live and the Check button works.
Your attempts, your scores, the code in the editor, which hints you opened, and which diagnoses keep catching you — all of it lives in this browser’s local storage and is never sent anywhere, because there is nowhere to send it. Clear your browser data and it is gone; open the site on your phone and it starts fresh. That is the trade for having no account.
The full detail, including what your browser fetches from third parties to run Python at all, is on the privacy page.
It will be. A diagnosis that misreads your code, an exercise whose contract argues with its own cases, a topic you went looking for and could not find — the speech-bubble button on the right edge of every page opens a panel that reaches me. It takes one line, it needs no account, and if you leave an email you get a reply.
Reports about a specific exercise are the most useful thing anyone sends, because the page you were on comes with them.
pythonmastery.io is the other half: lessons that explain a concept from the beginning, with worked examples and a full runnable notebook. This site assumes the explaining has happened and puts you to work. Every exercise links back to the lesson behind it, and the two are deliberately not copies of each other.
Every practice site I learned on could tell me a test had failed. None of them could tell me why, and the gap between those two sentences is where people quietly decide they are bad at programming. They are not. They are usually one sentence away from understanding exactly what happened — that the function fell off the end, that the list they were handed is not theirs to change, that Python compared the strings and not the numbers. Somebody sitting beside you would say it in five seconds. This site is an attempt to write those five seconds down, 146 times.
That is also why some ordinary things are missing. No leaderboard, because your pace is nobody else’s business. No streak, because a site that punishes you for having a life is not on your side. Nothing locked behind a prerequisite, because being told you are not ready yet has never once made anyone readier. The solution is on every page from the moment you open it, because withholding it is a trick, not a teaching method.
It is early. There are 171 exercises across 17 tracks today, each one written, executed and argued with by hand, and more are coming — in the same slow, unglamorous way, because the depth is the entire point and there is no way to rush it. I would rather add four exercises worth doing than forty worth skipping. There is no newsletter to join: what’s new is the announcement, dated, so you can see what actually arrived rather than what was promised.
If one explanation here ever saves you an evening of staring at a traceback that will not explain itself, the whole thing has paid for itself. If it does not, the speech-bubble button is right there and I would genuinely like to know why.