Getting Started with Python

Your First Python Program

Let's write your first line of Python code!

The print() Function

In Python, we use

print()
to display text on the screen.

print("Hello, World!")

How It Works:

  1. print
    is a function - it performs an action
  2. The parentheses
    ()
    contain what we want to print
  3. The quotes
    ""
    tell Python this is text (called a string)

Try running the code on the right! →

Visualizer
$ python hello.py
Hello, World!

Interactive Visualization

python
Loading...
Output
Run execution to see output...