Sometimes, we want to create multiline comments in Python.
In this article, we’ll look at how to create multiline comments in Python.
How to create multiline comments in Python?
To create multiline comments in Python, we can enclose the comment with '''
or create consecutive single line comments.
For instance, we write:
'''
This is a multiline
comment.
'''
to add a multiline comment.
Or, we can add consecutive single line comments with:
# This is a multiline
# comment.
Conclusion
To create multiline comments in Python, we can enclose the comment with '''
or create consecutive single line comments.