+ 1
triple quote a multiline comment but s='''hhj ddf''' multiline string... didnt understand
4 Réponses
+ 3
""" This is a Comment """
variable = """ This is multi-line
string. So it will
save exactly like this """
There is a difference If you see usually we assign multi-line strings to variables for future use. If you use it directly in print statement, it's a multi-line string not comment
print (""" Another example
to show multi-line
string in print """)
+ 1
yes, a multi line comment """
.....
.....
.....
"""
+ 1
A comment is used in python by """........""" . This means the writing between """....""" is not interpreted by python.
0
I'd recommend using # for comments to avoid confusion.