How to Add Comments in Python


In this example we will show the methods to add comments in Python.

2. Single Quote Comment

We can see the single quote notes as follows:

#!/usr/bin/python3
'''
This is a multiline comment with three single quotes
This is a multiline comment with three single quotes
This is a multiline comment with three single quotes
'''
print("Hello, World!")

3. Double Quotes Comment

We can see the double quotes comments as follows:

#!/usr/bin/python3
"""
This is a multiline comment with three double quotes
This is a multiline comment with three double quotes
This is a multiline comment with three double quotes
"""
print("Hello, World!")
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments