Q:

how to make a comment in python

# You use a hastag at the beginning of the line to make anything after it a comment
'''
You can also make a multi line comment
With three single quotes at the beginning and end!
'''
14
# single line : add # 

""" 
The recommended method for commenting multiple lines is using # on each line.
The (“””) method isn’t actually a comment but defines a Text constant
of the text between the (“””).
It isn’t displayed, but exists and could potentially cause unexpected errors.
""" 
 
4
#this is commented
'''
this
is
also 
a 
comment
'''
5
# This is a comment for one line

"""
This is comment for multiple lines,
as you can see
"""

""" But also this is valid """
3
    # To make a comment in python use the hashtag symbol
1
# This is a comment
5
# Use Hashtag to add comments in python
1
#Use a hash
0
# This is a comment
'''
This is a
MULTI LINE comment!
'''
0

New to Communities?

Join the community