← Python for Beginners
0 of 27 lessons done0%

Basics · Lesson 2 of 27

Comments and print options

Comments

A line that starts with # is a comment. Python ignores it. Comments are notes for humans.

# This line is ignored
print("This runs")  # a comment can also go at the end of a line

Printing many things at once

Give print() several values separated by commas. It puts a space between them:

print("I am", 21, "years old")   # I am 21 years old

sep and end

  • sep changes what goes between the values (default is a space).
  • end changes what goes at the end (default is a new line).
print("2026", "11", "03", sep="-")   # 2026-11-03
print("Loading", end="...")
print("done")                        # Loading...done

Your task

Using two print() calls, print this on one line:

Python is fun

The first print() should print Python is and the second should print fun.