NEPTUNIAN ANALYTICS

Comments

Comments are statements in a program that the compiler or interpreter ignores. Comments are often used to help explain code. You begin a comment in Python using #, and that comments out anything after, on that line of code.

Commenting out code

#addition
7 + 5

Output

12

In the above example, we commented out the first line of code saying addition, and so it was ignored by the interpreter. Of course, you wouldn't really need to create a comment here since it's obvious what the code is doing.