Python Tutorials

Choose a lesson to begin

Hello World and Print Statements

Welcome to your first Python tutorial! Let's start with the most fundamental skill in programming: displaying output.

The print() Function

The print() function is your primary way to show information to users. It's simple but powerful.

Basic Printing

print("Hello, World!")

This displays: Hello, World!

Printing Multiple Items

You can print multiple things at once, separated by commas:

print("Python", "is", "fun!")

This displays: Python is fun! (Python adds spaces between items automatically)

Printing Numbers

print(42)      # whole number
print(3.14)    # decimal number
print(10 + 5)  # math calculation

Comments

Notice the # symbol? Everything after it on a line is a comment — Python ignores it. Use comments to explain your code.

# this is a comment
print("This runs")  # this is also a comment

Try It Out!

Click the example code button to load a working example, then try these challenges:

  • Print your name
  • Print three of your favorite things on one line
  • Print the result of 100 divided by 4
  • Next Steps

    Once you're comfortable with print(), move on to Variables and Data Types to learn how to store and work with information!

    🐍 Python Runner