It seems like you can use both '''comments...''' and """comments...""" for multi-line comments. Is there any substantive difference between the two, or is it just a matter of preference?
2 Answers
These are not comments, they are docstrings. Python allows you to define multi-line strings using triplets of either apostrophes or quotation marks, but PEP 257 recommends using the quotation marks with docstrings for consistency. It has no effect on the contents of the string, however.