Python Comments with Examples

Spread the love

Single Line Comment:

If you want to comment a single line in python, you have to use # in starting of the sentence.

Example:
#print("hello world")

 

Multiline Comment:

For multiline comments, you have to use triple quotes in starting and ending of the lines

Example:
"""a= 1
b=2
c=a+b
print(c) """

 

admin

admin

Leave a Reply

Your email address will not be published. Required fields are marked *