Online Python compiler
Run Python code online free, no sign-up: write a Python 3 program, give it input on stdin and see its output, errors and run time in your browser.
How do I run Python code online?
This is an online Python 3 compiler and interpreter: write a script in the editor, put the lines it reads in the Input box and press Run. It runs on the server and shows what it printed, the traceback if it raised one, and how long it took — free, with no sign-up.
How it works
- Write your program. A Python program is a script: no main function is needed, and the file runs top to bottom. Define functions first and call them below, or put the work under if __name__ == "__main__": as you would in a file.
- Give it input. input() reads one line without its newline; sys.stdin.read() reads everything at once, which is quicker for large input. input().split() gives the words of a line and map(int, input().split()) its numbers. Put every line the program reads in the Input box before you run it.
- Run it. Press Run or Ctrl+Enter. You get what the program printed, any compiler or runtime error, and how long it ran. The first run without an account asks a quick check that you are a person.
Who it is for
Anyone writing Python who wants it run now: a student checking a lab program or an exam answer, someone on a machine where nothing can be installed, or a learner trying Python before setting it up.