Comments in Python

Comments are used to explain the logic of the program so that anyone can understand the program without your help.

This increases the readability of the program.




# - Python comment

In Python, a statement which starts with '#' will be considered as a comment.




Python program with comments

Example

#Hello world program in python

print("Hello World")  #I am a comment.

#End of the program


Comments will be ignored by the interpreter.

It will not be a part of program execution.