← Python tutorial

Python

Introduction to Python

Python is a general-purpose programming language known for clean, readable syntax — it uses indentation instead of curly braces to mark blocks of code, which forces consistently formatted code across every project and every developer who touches it.

Example: the simplest possible program

print("Hello, world!")

print() outputs a value. Compare this single line to the equivalent in a language like Java or C#, which needs a whole class and method wrapper just to print one line — Python's minimal ceremony is a big part of why it's such a common first language, and why it's also popular for quick scripts and data work where you want to focus on the actual problem, not boilerplate.

These examples are shown read-only here (no in-browser Python execution), with the expected output shown below each one so you can follow along without needing Python installed yet.

Example
print("Hello, world!")
Output
Hello, world!