Index
Introduction
Comments are parts of code that are not executed by the compiler
Line Comment
Comments starts with a #
, and Python will ignore them:
Comments can be placed at the end of a line, and Python will ignore the rest of the line:
Multiple Lines Comments
- Python does not really have a syntax for multiline comments.
- Since Python will ignore string literals that are not assigned to a variable, you can add a multiline string (triple quotes) in your code, and place your comment inside it: