Explain comments and its types with
example?
Ans.- comments in python can be used to
explain any program code .It can also be used to hide the code as well.
Comments are the most helpful stuff of any program. It enables us to understand
the way ,a program work. In python, any statement written along with # symbol
is known as a comment. The interpreter does not interpret the comment .Comment
is not a part of the program but it enhances the interactivity of the program
and makes the program readable
Types of
comments:
1.)
Single line comment: In case user wants to specify a single line comment, the comment must
start with ?#?
2.)
Multiline comment: Multiline comment can be given inside triple quotes.