Python Comments
What are comments in python?
Comments are lines or lines of codes that the programmer does not want to execute. Comments are written in the program for hints and to indicate what this line of code do.
Types of comments.
There are two types of comments in python :
- Single-line comment
- Multi-line comment
Single-line comment :
Single-line comment allow to comment a single line of code or hint. To comment a single line, write hash sign ( # ) at the beginning of the line. For example # This is a comment (shown below).
Multi-line comment :
Multi-line comments allow to comment more than one line of code or hints. To comment multiple lines, write your comment between triple quote ( ''' ''' ). For example ''' This is a comment '''. Shown below.
Comments
Post a Comment