10/16/18

Python Keywords & Comments


In Python, there are two ways to annotate your code.
The first is to include comments that detail or indicate what a section of code – or snippet – does.
The second makes use of multi-line comments or paragraphs that serve as documentation for others reading your code.
Think of the first type as a comment for yourself, and the second as a comment for others. There is not right or wrong way to add a comment, however. You can do whatever feels comfortable.
 Single-line comments are created simply by beginning a line with the hash (#) character, and they are automatically terminated by the end of line.

# Print keywords supported by Python 3.x
import keyword
print(keyword.kwlist)


# Single Line comment
# Single Line comment
# Single Line comment

"""Multi
Line
Comment"""

'''Multi
Line
Comment'''

print (10)




0 comments:

Post a Comment