Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

comment code 1

Status
Not open for further replies.

Sidro

MIS
Sep 28, 2002
197
0
0
US
hi,
In Python, how many ways are there to do a comments?
Cound you give examples? thanks.
 
Hye,

You can do a command with at least two methods . The first one is to use the # like :

#----> this is my own comment

Or better if you want to add a comment that can be used by the help keyword (via idle) you can do this :

def function toto():
""" This is my comment """

When using toto you can type the following command :

help(toto)

The return will be :

Help on function toto in module mymodule:

toto()
This is my comment


Hope that help !!!

BCFR92
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top