A Python program to print the single line comment. In this program we can print the single line comment for python. Single-line comments are formed by starting a line with the hash (#) character and ending it with the end of the line. A delimiter (“”) is added to each end of a comment to make comments that span many lines and are used to discuss things in greater depth. / is a single-line comment. From the / through the end of the line, everything is a comment. Use /* to start a comment and */ to finish a comment to mark a whole region as a comment.
#This is a comment
print("welcome to inlarn.com")
welcome to inlarn.com
What is multiline comment in python
When we need to remark on many lines, we may utilize multi-line comments. You can also use a single-line remark, but it’s easier to comment on several lines when you use a multi-line comment instead of a single-line comment. Multi-line commenting in Python is done with triple double quotes (“””) and single quotes (“‘).
What is comment in python programming language
In Python, comments are non-executable statements. It indicates that neither the Python compiler nor the Python Virtual Machine will run them. Comments are meant for human comprehension rather than the compiler or PVM. As a result, they’re known as non-executable statements.