Skip to content

Online Python Compiler (Python 3)

Run Python 3 in your browser: print, input(), loops, functions, classes and the standard library (math, random, datetime, json, re). Errors point to the line. Nothing to install.

Private · on device. Runs in your browser: your file is not uploaded. No sign-up.

main.py
Output

Press Run (or Ctrl+Enter) to see the output here.

How to use an online Python 3 compiler

  1. Write Python in the editor, or choose an example.
  2. If your program uses input(), type the answers in the Input box, one per line.
  3. Press Run (or Ctrl+Enter) and read the output.
  4. An error shows the line it happened on, marked in red in the editor.

Learning to code? The free courses in the Learn section go from beginner to expert, with tasks checked in this same editor. Other languages: all languages, JavaScript, TypeScript, SQL, HTML, CSS & JS.

Frequently asked questions

Which Python version is this?

Python 3 (the current release run by Pyodide, a version of Python made for browsers). The first run downloads Python once, about 12 MB; after that it starts quickly.

Can I use input()?

Yes. Type the answers in the Input box below the output, one line for each input() call, then press Run.

Can I import numpy or pandas?

Not here. The standard library works: math, random, datetime, json, re, collections, itertools, statistics, csv and more.

Is my code uploaded?

No. Python runs inside your browser. Your code is kept only on this device so it is there next time.

Where can I learn Python step by step?

The free Python course in the Learn section goes from zero to expert, with tasks that are checked in this same editor.