Python Comments

Python Comments

Python supports two types of comments:

1) Single lined comment:

In case user wants to specify a single line comment, then comment must start with ?#?

Eg:

 

# This is single line comment.  

2) Multi lined Comment:

Multi lined comment can be given inside triple quotes.

eg:

 

”’ This 

    Is 

    Multipline comment”’  

eg:

 

#single line comment  

print “Hello Python”  

”’This is 

multiline comment”’