How to comment multiple lines in python?
When you are writing a program it is necessary that your program is easily readable and easy to understand by others. An easy way to increase the readability of the program is to use comment.
Multiline comment is a type of comment .
Multiline comment are paragraph that serve as documentation for others while reading your program. In this comment we have to use hash (#) before every line of the paragraph.
#comment #Multiline comment #An example of multiline comment print("Python is a famous programming language")
output - Python is a famous programming language.
There is another method to write a multiline comment which is known as Docstring. In this type of comment we use triple quotes. If we write the comment before code it will not return in output. But if we write it after the code it will return in output.
""" Docstring Multiline comment example of Docstring""" print("Hello, World!")
output - Hello, World!
This is all about multiline comment.