In this tutorial will explain, how to use comments in python programming language.
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.
780 total views, 3 views today