Comments

17 0 0
                                        

Long script of code are hard to understan for others or self (If the code is seen after sometime). So, to deal with this problem there is solution called comments. Comments are used to describe the code. Comments starts with "#" and ends at the end of line And anything written between this is ignored by the interpreter. Example

print(12)     #This is a comment
In the above example you have seen an hash character suceeded by a statement which is a comment.
      Now whrn you print this program the answer will be 12. So, comments have no effect on output but provide better readibility to the program.

Python Guide for BeginnersWhere stories live. Discover now