Python playground

Run Python online

Write and run Python 3 online. A free Python compiler in your browser, with input() support, clear error messages and nothing to install or sign up for.

Code main.py

# Welcome to the coding.kitty Python playground.
# Press Run (or Ctrl+Enter) to see what this prints.

cats = ["Miko", "Nola", "Baymax"]

for number, name in enumerate(cats, start=1):
    print(f"{number}. {name} says meow")

print(f"That's {len(cats)} cats.")

# Type a name in the Input box, then remove the # from these two lines:
# name = input("What's your cat called? ")
# print(f"Hello, {name}!")
Output

Press Run to see what your code prints.

About this Python playground

This is a Python compiler you can use straight away. Write Python in the editor, press Run, and the output appears next to it: everything your program prints, any error with its traceback, and how long it took.

Your code runs on a real Python 3 interpreter in an isolated sandbox on our servers, not a cut-down version in the browser, so it behaves the way it will on your own machine. It is free, with nothing to install and no account needed.

What you can run

  • Python 3.11, running one file per run, saved as main.py.
  • Standard library only. The whole standard library is there, so math, random, datetime, json, re, collections, itertools and functools all import as normal. There is no package installer, and programs have no network access.
  • Limits: 10 seconds and 256 MB of memory per run. Output past 64 KB is cut off, code can be up to 64 KB and input up to 16 KB.
  • Fair use: 5 runs a minute and 50 a day without an account, 10 a minute when you are signed in.

Reading input

Open the Input box under the editor and type what your program should read. Each call to input() reads the next line. With the box empty, input() finds nothing to read and raises EOFError.

name = input("Your name: ")

Frequently asked questions

Is this online Python compiler free?

Yes. There is no sign-up and no limit on how much you can write. Signed-out visitors get a quick, usually invisible bot check when they press Run, and a fair-use cap of 5 runs a minute and 50 a day. Signing in raises it to 10 runs a minute.

Which version of Python does it run?

Python 3.11 (CPython, the standard interpreter). Anything written for Python 3.11 or earlier Python 3 versions runs as it would on your computer.

Can I install packages like NumPy, pandas or requests?

No. The playground runs the standard library only: there is no pip, and programs have no network access, so nothing can be downloaded while your code runs. Everything that ships with Python itself is available.

How do I use input() in the playground?

Open the Input box under the editor and type the lines your program should read before you press Run. Each input() call reads one line. The prompt you pass to input() is printed to the output as usual.

Why did my program stop with a time-out?

Each run gets 10 seconds and 256 MB of memory. A program that goes past either is stopped. The usual cause is a loop that never ends, or an input() waiting for a line that is not in the Input box.

Is my code saved or shared?

Your code is kept in your own browser so it is still there next time, and nowhere else. When you press Run it is sent to our code runner, run once in a sandbox, and thrown away. We do not store it or show it to anyone.

Keep going

Also in the playground: JavaScript, TypeScript, SQL, Bash, C, C++, Go, Rust, Java, C#, Ruby, PHP, Lua, R, Dart, Swift.