comments are non executable statements or ignore statements. using this comments we can declare user defined or customized statements in the source code.
python supports two types of comments,
1) Single line comment.
2) Multiple line comment.
1) Single line comment :
in python we use the pound(#) symbol to start writing a comment. if we want to only specify one line comment then we can use single line comment.
Example:
>>> #this is single line comment
2) Multiple line comment :
if we have comment that extend multiple lines, one way of doing it is to use pound(#) in the beginning of each line.
Example:
>>> #print("welcome to python")
>>> #multiple line comment
python supports two types of comments,
1) Single line comment.
2) Multiple line comment.
1) Single line comment :
in python we use the pound(#) symbol to start writing a comment. if we want to only specify one line comment then we can use single line comment.
Example:
>>> #this is single line comment
2) Multiple line comment :
if we have comment that extend multiple lines, one way of doing it is to use pound(#) in the beginning of each line.
Example:
>>> #print("welcome to python")
>>> #multiple line comment
No comments:
Post a Comment