Loading playground…
How the sandbox works
- Your code runs in CPython compiled to WebAssembly (Pyodide), inside a Web Worker; it never touches this page or any server
- Network access is disabled inside the sandbox.
- The standard library is included, and popular packages (numpy, pandas, matplotlib, …) are automatically installed on first import
- turtle is supported through a pure-Python implementation: drawings render as an image below the output, as do matplotlib figures
- exec(), eval() and compile() are disabled, and the interpreter’s own files are read-only; your working directory stays writable
- Runs are limited to 15 seconds (plus up to 60s for package downloads) and 64 KB of output; use Stop to end a run, or Restart runtime for a clean interpreter