S2E1 : Comments In Python
Hello, my name is Kishan Tongrao. Today we are going to look at the Comments In Python.
The joy of coding Python should be in seeing short, concise, readable classes that express a lot of action in a small amount of clear code — not in reams of trivial code that bores the reader to death. — Guido van Rossum
Below are two types of comments present in Python.
- Single Line Comment
- Multi-Line Comment
Single Line Comment
- In Python, ‘#’ is considered as a single line comment symbol or key.
- If you are starting your line with ‘#’, it will not be a part of any interpreter process. The interpreter ignores the line that starts with ‘#’.
- You can use as many ‘#’ in a single line as a single line comment.
Multi-Line Comment
- In Python, ‘’’ ‘’’ or “”” “”” is considered as a multi-line comment symbol or key.
- As long as you are not assigned ‘’’ ‘’’ or “”” “”” to any variable, the interpreter will ignore lines inside the quotation.
That’s it!
Thank You For Your Time.