Python Basics

How to write a comment in python ?

Often we are required to write comments inside a python script. Unlike C,C++,Java,.Net in python, writing a comment is bit different.

How to write a comment in Python?

In python, we can write single line comment and multiline comment.

Single line comment

Begins with #

Example

#this is an example of single line comment

Multiline comments

Multiline comments are wrapped in between triple quotes.

Example

”’

This is an example of multipline comment

This is an example of multiline comment

This is an example of multiline comment

”’

==================================================================

The above answer is for following questions also:

How to write a comment in python ?

How to make a comment in python ?

How to do a comment in python ?

How to make a comment in python 3 ?

How to insert a comment in python ?

How to print a comment in python ?

How to comment in python ?

How to comment in python multiple lines ?

How to comment in python pycharm ?

How to comment in python idle ?

How to get comment in python ?

How to comment in python 3 ?

How to comment in python shortcut ?

How to comment in python code ?

How to comment in python script ?

How to comment in python jupyter ?

How to comment in python using keyboard ?

How to comment specific lines) in python program ?