Codecademy Logo

Getting Started with Python

Related learning

  • An introduction to the basic syntax and fundamentals of Python for experienced programmers.
    • Intermediate.
      3 hours

Comments

A comment is a piece of text within a program that is not executed. It can be used to provide additional information to aid in understanding the code.

The # character is used to start a comment and it continues until the end of the line.

# Comment on a single line
user = "JDoe" # Comment after code

Learn more on Codecademy

  • An introduction to the basic syntax and fundamentals of Python for experienced programmers.
    • Intermediate.
      3 hours