Python Programming – Comments

In this tutorial will explain, how to use comments in python programming language.

Comments

A comment is a piece of text that doesn’t affect the output of the code. The comments use to understand the purpose of a particular program. It doesn’t display the output of the program.

Python programming has two type of comments:

  • Single line comment
  • Multiple line comment

Single line comment

# used to begin the comment in python programming.

#Single line comments

Multiple line comment

The multiple line comment begin and end with triple quotes(” ” “).

"""
This is 
multi-line
comment example in python
"""

To add a multi line comment you could insert a # for each line:

#This is multi line comment 1
#This is multi line comment 2
#This is multi line comment 3

Python is the most popular and widely-used programming language for many years. You can learn Python programming with examples by following our Python articles sequentially.

 241 total views,  2 views today

3 thoughts on “Python Programming – Comments”

  1. I Am really impressed with this blog because this blog is very easy to learn and understand clearly. This blog is very useful for college students and researchers to take good notes in a good manner, I gained much unknown information.

Leave a Comment

Your email address will not be published. Required fields are marked *

wpChatIcon