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 comments in Python
# used to begin the comment in python programming.
#Single line comments
Multiple line comment in Python
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.
397 total views, 1 views today
Thank you for sharing the knowledge with us!
Nice article.
Nice article. Helpful information.
Comments are an important part of any programming language.
It gives us a better understanding of the program.
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.
Thanks for sharing the information with us.