Your first Python program

Start with a small program and learn how Python runs instructions in order.

Python is a general-purpose programming language used for automation, web services, data work, and many other tasks. A program is a sequence of instructions that Python interprets and executes.

Print a message

python · static example

print("Hello, campus!")

`print()` displays a value in the program's output.

Sample output
Hello, campus!

Labeled sample only — nothing was run on this page.

Knowledge check

Which function displays text in this example?

Pick an answer to check.