Python Comments | Comments In PYTHON

PYTHON COMMENTS:

PYTHON comments are used to make a line to understand the user who can see the code.

INTRODUCTION: 

Comments are used to write a line that will never run by a Python interpreter. the line called Python COMMENTS.

ADVANTAGE OF PYTHON COMMENTS: 

By using the Python comments, we can make a Python code with some definitions and understandable code. by using the comments, we can make a describable and explained Python code.
comments can be used to explain the code.
python comments can be used to make code more readable.

  •       READABILITY OF THE CODE.
  •       RESTRICT CODE EXECUTION.
  •     PROVIDE AN OVERVIEW OF THE PROGRAM OR PROJECT METADATA.
  •       TO ADD RESOURCES TO THE CODE.

      Types of Python Comments: 

1. Single-line Comments
2. Multi-line Comments

SINGLE LINE COMMENTS (#): -


Single-line comments are also called one-line comments. That means by single line comment we can do only one line as a comment. We can do single-line comments with a hashtag (#).

Python Comments | Comments In PYTHON | diplomawaale.blogspot.com
SingleLine Comment

MULTI-LINE COMMENT BY HASHTAG (#): 


This is like a single-line comment but we can use a hashtag (#) multiple times to do multi-line comments.

Python Comments | Comments In PYTHON | diplomawaale.blogspot.com
MultiLine Comments

MULTILINE COMMENT BY ('''______'''): -


We can do multiline comments by using ('''     ''').

Python Comments | Comments In PYTHON | diplomawaale.blogspot.com



Post a Comment

0 Comments