Basics

Hello World

The first Python program prints a line of text.

Every Python program starts by executing statements from top to bottom. Calling print() is the smallest useful program because it shows how Python evaluates an expression and sends text to standard output.

Source

print("hello world")

Output

hello world
print("…")stdouthello world
Every Python program starts as source and produces text on standard output. The smallest mental model.

Notes

See also

Run the complete example

Example code

Expected output

hello world

Execution time appears here after you run the example.