Hello, World!
print("Hello, World!")Tap Run to execute
main.py · output appears here
Press Run to execute
Output streams here as your program runs.
Python is a high-level, dynamically typed programming language created by Guido van Rossum and first released in 1991. It emphasizes code readability through significant indentation and a clean, expressive syntax. Python is multi-paradigm, supporting procedural, object-oriented, and functional styles, and ships with a large standard library that makes it productive for everything from quick scripts to large applications.
Today Python is one of the most widely used languages in the world, dominant in data science, machine learning, automation, web backends, and education. Its rich ecosystem includes frameworks like Django and Flask for web, and NumPy, pandas, and PyTorch for numerical and AI workloads. The reference implementation, CPython, is what most developers run, and it powers a huge community of third-party packages on PyPI.
main.py is the entry point. Add helper files from the explorer and import them into your project.
Use the Input panel to pipe standard input to your program when it needs data.
Run sends your code to a fresh hosted runtime and streams the result into the output panel.
Your draft stays in this browser, and Share creates a separate snapshot link.
main.py imports a function from the sibling helper module.
from helper import answer
print(answer())
def answer() -> int:
return 42
print("Hello, World!")name = input("Enter your name: ")
print(f"Hello, {name}!")fruits = ["apple", "banana", "cherry"]
for i, fruit in enumerate(fruits, start=1):
print(i, fruit)def factorial(n):
if n <= 1:
return 1
return n * factorial(n - 1)
print(factorial(5))try:
n = int("abc")
except ValueError as e:
print("Could not parse:", e)
finally:
print("Done")text = "banana"
counts = {}
for ch in text:
counts[ch] = counts.get(ch, 0) + 1
print(counts)s = " Hello, World "
print(s.strip().lower())
print(s.strip().split(", "))
print("-".join(["a", "b", "c"]))class Person:
def __init__(self, name, age):
self.name = name
self.age = age
people = [Person("Ada", 36), Person("Bob", 28)]
people.sort(key=lambda p: p.age)
for p in people:
print(p.name, p.age)nums = range(1, 11)
squares = [n * n for n in nums if n % 2 == 0]
print(squares)
print(sum(squares))def kind(x):
match x:
case 0:
return "zero"
case int():
return "int"
case _:
return "other"
print(kind(0), kind(5), kind("hi"))The editor uses Monaco, the engine behind VS Code, with language-aware editing tools and familiar keyboard controls.
Type or paste your code into the editor, then click Run (or press Ctrl/Cmd + Enter) to execute it.
Output streams into the console panel, including runtime errors, exit status, and execution time.
Nothing to install and no account to create — code runs in an isolated hosted runtime.
Language-aware autocomplete and IntelliSense suggestions where the editor has a matching language service
Syntax highlighting, with native compiler and runtime errors shown in the console
Bracket matching, auto-indentation, code folding, and a minimap
Multi-cursor editing plus find & replace (Ctrl/Cmd + F)
Full undo/redo history and copy to clipboard
Built on Monaco — the same editor that powers VS Code
Run on demand, or turn on Auto-run to execute on every change
Stop long-running or infinite programs at any time
A real console shows standard output, errors, exit status, and execution time
Pass standard input (stdin) to your program from the Input panel — one value per line
Switch between light and dark themes
Adjust font size and other editor settings
Toggle side-by-side or top/bottom layouts
Enter distraction-free fullscreen mode
Generate a shareable link to your exact code in one click — no login needed
Your work autosaves to your browser, so you can pick up where you left off
Copy the active file to your clipboard
Run code: Ctrl/Cmd + Enter
Find & replace: Ctrl/Cmd + F
Open the full shortcut list from the keyboard icon in the toolbar
Python is one of 23 linked-project compilers. Run always starts main.py; selecting a helper tab changes what you edit, not the entry file.
main.py imports a function from the sibling helper module.
Linked-project languages (23): Node.js, TypeScript, Deno, Python, C, Go, Dart, Swift, Rust, Ruby, PHP, Java, Kotlin, C++, C#, Nim, Crystal, Haxe, Zig, Scala, D, Bun, Objective-C.
Single-file scratchpads (46): Matplotlib, NumPy, pandas, Haskell, Clojure, Perl, Lua, Tcl, jq, Raku, Elixir, Bash, Zsh, Nushell, R, Assembly (NASM), Julia, Octave, Groovy, PowerShell, Visual Basic .NET, Odin, Pascal, Lisp, Erlang, CoffeeScript, COBOL, BASIC, V, Racket, OCaml, Prolog, AWK, Emacs Lisp, Emojicode, Forth, F#, Fortran, Assembly (NASM64), Solidity, Mojo, Ada, WASM (WAT), Gleam, Shell Script (sh), Scheme. Their extra project files are not submitted to the runtime.
Download project exports every Python tab and a README in one ZIP archive.