Course Content

  • MyBlogSite

Course Content


In Python, comments are short summaries that are added to the code to make it more readable. They are used by programmers to record their thought processes when producing code. It explains why a certain line of code was written in the first place.

There are two ways to annotate your code in Python. The first is to provide comments that explain or indicate what a particular section of code (or snippet) accomplishes. The second approach employs multi-line comments or paragraphs as documentation for others reading your code.

In Python, a comment begins with the hash character # and continues until the end of the physical line. However, a hash character within a string value is not considered a comment. A remark can be written in three different ways: on its own line, next to a line of code, or as a multi-line comment block.

Block comments, inline comments, and documentation strings are the three types of comments available in Python.

A line of text in a Python programme that is not executed by the interpreter is known as a remark. During debugging, comments are used to detect problems and explain code. The hash symbol (#) is used to begin comments.

Recommended Courses

Share With Friend

Have a friend to whom you would want to share this course?

Download LearnVern App

App Preview Image
App QR Code Image
Code Scan or Download the app
Google Play Store
Apple App Store
598K+ Downloads
App Download Section Circle 1
4.57 Avg. Ratings
App Download Section Circle 2
15K+ Reviews
App Download Section Circle 3
  • Learn anywhere on the go
  • Get regular updates about your enrolled or new courses
  • Share content with your friends
  • Evaluate your progress through practice tests
  • No internet connection needed
  • Enroll for the webinar and join at the time of the webinar from anywhere