S2E1 : Comments In Python

Kishan Tongrao
1 min readSep 8, 2021

Hello, my name is Kishan Tongrao. Today we are going to look at the Comments In Python.

The joy of coding Python should be in seeing short, concise, readable classes that express a lot of action in a small amount of clear code — not in reams of trivial code that bores the reader to death. — Guido van Rossum

Photo by Randalyn Hill on Unsplash

Below are two types of comments present in Python.

  1. Single Line Comment
  2. Multi-Line Comment

Single Line Comment

  • In Python, ‘#’ is considered as a single line comment symbol or key.
  • If you are starting your line with ‘#’, it will not be a part of any interpreter process. The interpreter ignores the line that starts with ‘#’.
  • You can use as many ‘#’ in a single line as a single line comment.

Multi-Line Comment

  • In Python, ‘’’ ‘’’ or “”” “”” is considered as a multi-line comment symbol or key.
  • As long as you are not assigned ‘’’ ‘’’ or “”” “”” to any variable, the interpreter will ignore lines inside the quotation.

That’s it!
Thank You For Your Time.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Kishan Tongrao
Kishan Tongrao

No responses yet

Write a response