0
I thought the Triple quotation marks made a comment instead of a string...can someone clarify?
2 odpowiedzi
+ 1
Python doesn't use triple quotations for comments, if you wanna comment your code, you have to use pound (#) sign.
Sometimes you have to use double quotations in your string, that way in order to tell the Python interpreter that these quotations are part of the string, you may use single or triple quotations. It's just a convention, but one advantage that triple quotations have, is that by using them, you can write multi-line strings.
0
python uses triple ''' for multi line comments.
#This is a python comment
'''
This is also
a Python comment
'''