Next →

2. Your First Python Command

What Does print() Do?

The print() function in Python is used to display text or variables on the screen. It's one of the most basic — and most useful — functions you'll use in Python.

Here’s how you use it:

print("Hello World")

When this line runs, Python outputs:

Hello World

Why Start with Print?

The print() function helps you understand what your code is doing. Whether you're displaying messages, checking results, or debugging, you'll use print() often as you learn to code.

Before we get too ahead of ourselves, remember the basics

Python Syntax Basics
# This is a comment
print("Hello")  # This prints Hello

Keep your syntax clean to avoid simple bugs.