Single line , inline and multiline Comments in Python for easy maintenance and understanding script

Опубликовано: 27 Январь 2026
на канале: plus2net
685
6

https://www.plus2net.com/python/comme...
We can write single line comments which will be ignored by Python and these comments are not executed. Writing comments is a good practice as it helps in understanding the code and good for code maintenance.
Single line code.
Single line comment
print('Hello world')
inline comment
print('Hello world') # this part is commented
Multiline comments are not supported by Python but we can write by using three single or double quotes ( don’t mix ).
#pythoncomments #singlelinecomments #multilinecomments