Playground
Real Python, running in your browser, with no installs and no accounts.
Output
This runs real Python entirely inside your browser, so it is completely safe to experiment. Nothing you type here is sent anywhere, saved, or seen by anyone else. If a program runs for more than 10 seconds it is stopped automatically, which is almost always a sign of an accidental infinite loop, such as a while loop that never reaches its exit condition.
Under the hood, this uses Pyodide, which is CPython (the standard Python interpreter) compiled to WebAssembly so it can run directly in the browser. Your code executes on a separate worker thread rather than the main thread, which is why the page stays responsive even while Python is running. If a run is stopped, the entire worker is terminated and replaced, since there is no safe way to interrupt Python mid-instruction. One limitation worth knowing: input() will not work here, because a worker has no interactive standard input to read from.