A comment begins with a hash character(#) which is not a part of the string literal and ends at the end of the physical line.
All characters after the # character up to the end of the line are part of the comment and the Python interpreter ignores them.
See the following example.
It should be noted that Python has no multi-lines or block comments facility.
# this is a comment
print ("hello world" )
"""this is a comment"""
print ("hi world" )
# this is a comment
# this is a comment in multi line
# this is a comment containing multiple line
print ("hello world" )
'''this is a comment
this is a comment
this is a comment having multiple line'''
print ("hi world" )