Run Python online

Try Python lists, write a function or experiment with async tasks. The interpreter runs in your browser with a console beside your code.

No account needed for browser-local experiments. Cloud saving is optional.

main.py
prices = [120, 80, 200]
total = sum(prices)
print(f"Total: {total}")
Expected output
Total: 400

Python in the browser

Run small programs locally with the bundled Pyodide runtime.

Input and errors

Supply standard input and inspect source locations when an error is reported.

A scoped API example

Optionally enable the bundled requests demo for approved JSONPlaceholder GET/HEAD requests.

How to use this tool

  1. Open the Python playground and wait for the runtime to initialize.

  2. Edit the example and supply standard input if your program uses input().

  3. Click Run; inspect the console or jump to an available error line.

Limits and requirements

Python runs as browser WebAssembly, not a full server environment. Arbitrary pip packages, operating-system access and unrestricted networking are unavailable. The optional API demo has an allowlist, request limits and a separate execution timeout.

Practice exercises

Browse Python practiceSee all practice exercises

Frequently asked questions

Will my source be saved?

Local drafts stay in this browser’s storage. Export a ZIP or source file to keep a separate copy. Cloud saves need a configured account and are sent to the site’s database.

Does this use AI?

Running code in this playground does not call an AI provider.

Can I use real account credentials in sample code?

Use test data for experiments. Browser code, source exports, console messages, and debug reports can expose values you put in them.