Python Comments
Python Comments
A comment is a part of the coding file that the programmer does not want to execute, rather the programmer uses it to either explain a block of code or to avoid the execution of a specific part of code while testing.
Single-Line Comments:
To write a comment just add a ‘#’ at the start of the line.
Example 1:
Output:
Example 2:
Output:
Example 3:
Output:
Multi-Line Comments:
To write multi-line comments you can use ‘#’ at each line or you can use the multiline string.
Example 1: The use of ‘#’.
Output:
Example 2: The use of multiline string.
Output: