Welcome to XCODX Online Compiler
Quick Start:
Ctrl+Enter Run code
Ctrl+S Save / Download
Ctrl+L Clear output
Select a language and start coding.
Welcome to XCODX Online Compiler
Quick Start:
Ctrl+Enter Run code
Ctrl+S Save / Download
Ctrl+L Clear output
Select a language and start coding.
Python is the most widely taught programming language in the world and, by most measures, the most widely used. Guido van Rossum released it in 1991 with a design goal that still explains its reach: code should read like the description of what it does. Significant indentation replaced brace noise, a large standard library removed the need to hunt for basic tools, and dynamic typing let a beginner get a working program running in an afternoon. Thirty-plus years later the same language runs Instagram's backend, trains most of the world's machine-learning models, and scripts build systems at nearly every large software company. The 3.x line is the only supported one; 2.7 reached end of life in January 2020.
# Hello World in Python
languages = ["Python", "Rust", "Go", "Haskell"]
for index, name in enumerate(languages, start=1):
print(f"{index}. Hello from {name}!")
total = sum(len(name) for name in languages)
print(f"{len(languages)} languages, {total} characters of names.")
Reach for Python when the problem is more about expressing an idea than squeezing out cycles: data analysis and visualisation, machine learning, scientific computing, web back-ends with Django or FastAPI, automation and glue scripts, scraping, DevOps tooling, and teaching. It is a poor fit where you need predictable microsecond latency, tight memory control, or true CPU parallelism inside one process — the reference interpreter still holds a global interpreter lock, so CPU-bound work scales across processes rather than threads.
The page runs whatever CPython 3.x build the execution server currently advertises, and the exact version is shown in the runtime badge beside the language name once the editor loads. Only the standard library is importable. There is no pip, no network access from inside the sandbox, and no persistent filesystem, so numpy, pandas, requests and every other third-party package will raise ModuleNotFoundError. Everything in the standard library is fair game, including json, re, itertools, collections, math, datetime, dataclasses and asyncio.
That is stdout buffering, not a bug in your program. When Python does not detect a terminal it buffers output, so the prompt string can still be sitting in the buffer while the program is already blocked waiting on your line. This page works around it: the editor reads the prompt text straight out of your source and shows it as a label on the input field, so you always know which value is being asked for. If you want the same behaviour when running locally, pass flush=True to print or run the interpreter with -u.
Press Run and type each value into the live terminal as the program asks for it, exactly as you would in a local shell — the connection stays open and stdin is streamed while the process runs. If you would rather paste everything at once, switch the input mode button to Stdin Box; the whole block is then handed to the program in one go before it starts. Reading until end of input with sys.stdin.read() or a for line in sys.stdin loop works in both modes; press Ctrl+D in the live terminal to close the stream.
main.pypythoninput()print("Hello from Python!")
name = input("Enter your name: ")
print(f"Welcome, {name}!")