S2E1 : Comments In Python

Photo by Randalyn Hill on Unsplash
  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.




Data Science Engineer

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

A head start on making your own Compiler/Interpreter

Kaggle Competition Training: A Student Testimonial

GO-SQUADS 3.0 Mini-Bootcamp Experience

Witnet Testnet fork, as ~35k nodes join in.

How You Do One Thing Is How You Do Everything

Remove Unused PdxTypes from an Apache Geode Distributed System

Seeders and Faker in Laravel

Meet the Anvs Team

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Kishan Tongrao

Kishan Tongrao

Data Science Engineer

More from Medium

Python: All about Integers

Some Python Tricks in One Line

confused filenotfound or file not created in the place you expect(Python)

Looping — Python