Comments in Python
Categories: Python
A hash sign (#)that is not inside a string literal begins a comment. All charactersafter the # and up to the end of the physical line are part of thecomment and the Python interpreter ignores them.
#!/usr/bin/python
# First comment
print "Hello,Python!" # second comment
You can type acomment on the same line after a statement or expression −
name = "Madisetti"# This is again comment
You can commentmultiple lines as follows −
# This is acomment.
# This is acomment, too.
# This is acomment, too.
# I said thatalready.