1.03
Completed
Comments with # Comments with #

Learn how Python comments work, how to write helpful notes with #, and how to use comments without changing program output.

Comments with #

Sounds useful?

Jump into the interactive version.

No setup. No account. Just Python.

Interactive Python lesson

Comments with # in Python

Python does not need to run every line you write. Some lines are just for humans, and that is where comments come in. This Block introduces comments with #: how Python ignores them, how they help readers understand your code, and how to use them without changing what your program prints.

What you will learn:

  • Write comments with #
  • Understand that comments are ignored by Python
  • Add comments above code and beside code
  • Spot the difference between a real comment and # inside text
  • Use comments to temporarily disable lines of code
  • Write helpful comments that explain intent instead of repeating the obvious

A small beginner skill, but a very useful one. By the end, your code will be easier to read without changing what it does.

> Start now 85 cards · about 7 min

Ready to practice this in the browser?

> Play now