Python comments

 

python comments by manojkumar dheeran

Python Comments

  • Comments in python are the lines ignored by compiler during the execution time
  • Comments enhance the readability of the code to help the programmer to understand the code very easily

  • types of comments
    • Single line Comments
    • Multi line Comments

Single line Comment

  • Python single line comment starts with the # hashtag symbol
  • used for supplying short explanation for variables, function declaration and expressions
#print "hello world"
print("Hello world")

Multi line Comment

  • Python does not provide the option for multi line comments
  • using multiple hashtag (#) to write multi line comments
  • Each and every line considered as single line comment.
#python comments
#print "hello world"

print("Hello world")


Search Terms:

python comments

types of comments in python

types of python comments

how do you write comments in python?

what are the python comments?

how to you comment multiple lines in python?

python comments example

python comments by manojkumar dheeran

python syntax

python tutorial for beginners

creating comments in python


Post a Comment

0 Comments