Single line comments

In Python for Comments We use the Hashtag symbol or the pound symbol (#). So whenever there is no need of executing a line in python we can use the pound symbol. This action is called as comment. Comments can be used to explain Python code.

When commenting a line, the computer will not execute that line of code. It will skip the execution of that particular line of code.

#This is a comment. This line will not get executed.
print("Hello, WiseLearner")

In the above line of code, only the second line is executed. The first line is not executed.

Multiple line comments

There is also Multi line comments added in python using the triple quotes ("""). The example for a multi-line comments is given below:

"""
This is a comment
but here we can write multi-line comments.
"""
print("Hello, Wise Learner !")

Until the above string assigned to a variable, these lines of code will act as a comment.