main.py
# Write your Python code here.
print("Hello, World!")
Online Python Compiler
Write Python code and run it right here, in your browser. Python runs on your own device, so it starts once and then every run is instant. There is nothing to install and no account needed.
What you can do
- Run Python 3 with Run or Ctrl + Enter (⌘ + Enter on a Mac). Turn on Live preview to run the code each time you stop typing.
- Type input for
input()in the Input panel, one value per line. - Keep files and folders. Your files stay in this browser, so they are still here next time.
- Understand errors. Problems shows the line, a plain-English explanation and the lesson that covers it.
- Share or download. Sign in to make a link anyone can open and run, or download the file as
.py.
Questions
Is this a real Python?
Yes. It is CPython compiled to WebAssembly (Pyodide), with the standard library. Code that reads files from your computer or opens network connections does not work in the browser.
Why did my program stop?
A run stops after 10 seconds, so a loop that never ends cannot freeze the page. Press Stop to end a run sooner.
I am new to Python. Where do I start?
Start with the Python lessons, then practise with the Python practice questions.