Skip to content

Python Comments

Syntax

Comments in Python are marked by a # for single-line comments or triple quotes (''' or """) for multi-line comments.

# This is a single-line comment
print('Hello World') # Comment at end of line
# Comment out code
# print('Hello World')
# Multiple
# single-line
# comments
'''
This is a
multi-line comment
'''
"""
This is another
multi-line comment
"""