Comment
Comments are used to explain the code, and to make it more readable. The code written in the comment doesn't get executed. There are 2 common types of comments in python -
- Single line comment
- Multi line comment (unassigned string)
Single line comments are used to comment out code of a single line. The code written after the comment symbol considered as a comment. In python # symbol is used for single line comment.
Code python
a=1 # single line comment
Multiple line comments are used to comment out code of multiple lines. In Python, unassigned strings can be used as multi-line comments because they are not assigned to a variable and thus get ignored."
Code python
"""
Hey there
share it if you find
it helpfull
"""