Three numbered welcome messages. The last line begins with 3. Changing the name should change all three messages.
RUN PYTHON · FREE PYTHON TOOL
Online Python Compiler & Runner
Write and run real Python in an isolated browser worker, provide standard input, and see printed output or tracebacks without installing Python.
Python runtime preparing…
Your result will appear here.
A WORKED TASK
Run a first Python program and read its output
The example loops through the numbers 1, 2 and 3. It prints a welcome message each time. Change Amina to another name, then run it again. The result belongs in the output panel: Python does not automatically display every variable or expression in a script.
This is a browser Python interpreter, not a remote machine with a terminal, installed desktop packages or an operating-system shell. Files and network-dependent scripts need adaptation.
What to check
- Put each answer for input() on its own line in the standard-input box before running.
- A traceback is a program error, not a website crash. Read its final line, then find the source line it names.
- Use Stop for a long-running loop. Stopping discards the worker, so variables from that runtime are not a permanent file system.
TESTED & REVIEWED
Know what this tool does—and where to double-check
- Reviewed by
- HTML Online Viewer project
- Last reviewed
- Processing
- Code and supported files are processed in this browser tab. Runtime tools download Python WebAssembly, but do not intentionally upload your source.
- Important limitation
- The browser runtime is intentionally isolated and may not include every desktop package, system command or network feature. Verify production programs in their target Python environment.
EXAMPLE INPUT
Start small, then use your own data
Python code
name = "Amina"
for number in range(1, 4):
print(f"{number}. Welcome, {name}!")Three numbered welcome messages. The last line begins with 3. Changing the name should change all three messages.
COMMON QUESTIONS
Python Compiler FAQ
Does this upload my code or files?
No. Processing happens locally in your browser. Runtime tools download Python itself, but your source is not sent to our server.
Why can the first Python run take longer?
The browser downloads and starts the Python WebAssembly runtime. Later runs in the same tab are normally much faster.
Can I stop a program that takes too long?
Yes. Runtime tools show a Stop button while Python is working. Stopping terminates the isolated worker and a clean runtime starts when needed.