Comments in Python

Lesson#6

Writing comments inside the program increases code readability. Python allows us to write comments in programs. Comments can be single-line or multi-lines. Single-line comments starts with # (hash) and multi-line comments starts and ends with ””” (three double quotes).

Examples are:

#This is a single line comment
print("Hello, World!")
""" These are all
multi-line comments.
Multi-line comments end with three quotation marks
"""
print("Hello, World!")

--

--