+ 1

triple quote a multiline comment but s='''hhj ddf''' multiline string... didnt understand

27th Oct 2016, 5:27 AM
Krimesh
Krimesh - avatar
4 Respuestas
+ 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 """)
27th Oct 2016, 6:55 AM
Waqas Asghar Bhalli
Waqas Asghar Bhalli - avatar
+ 1
yes, a multi line comment """ ..... ..... ..... """
27th Oct 2016, 6:04 AM
Miyaki Joshua
Miyaki Joshua - avatar
+ 1
A comment is used in python by """........""" . This means the writing between """....""" is not interpreted by python.
27th Oct 2016, 8:30 AM
Tonmoy (spell, Cup cake 3.0)
Tonmoy (spell, Cup cake 3.0) - avatar
0
I'd recommend using # for comments to avoid confusion.
27th Oct 2016, 9:17 PM
Alex Schrichte
Alex Schrichte - avatar