- Learn Python in 7 Days
- Mohit Bhaskar N. Das
- 71字
- 2025-04-04 19:20:06
Comments in Python
In Python, there are two types of comments--one is a single-line comment and the other is multiline comment. For a single-line comment, # is used, while for a multiline comment, triple quotes """ are used:
#This is a single line comment in Python
print "Hello World" #This is a single comment in Python
""" For multi-line
comment use three
double quotes
...
"""
print "Hello World!"