Using Help inside Python

R

rose

Hi,
I have an idea of the basics of programming language in
general. How to access help in python i.e. help followed by something
or to get to know about some inbuilt module or method etc. how do I
access help from within the IDLE using the help command.

Thank You.
 
S

Steven D'Aprano

Hi,
I have an idea of the basics of programming language in
general. How to access help in python i.e. help followed by something or
to get to know about some inbuilt module or method etc. how do I access
help from within the IDLE using the help command.

Thank You.

At the prompt, type any of:

help()

help(module)

help(function)

help(any_object)

help("keyword") # note the quotes around the keyword

then hit Enter to get help about that object or keyword.
 
R

rose

At the prompt, type any of:

help()

help(module)

help(function)

help(any_object)

help("keyword")  # note the quotes around the keyword

then hit Enter to get help about that object or keyword.

Many Thanks to you Steven, for such a concise explanation of using the
help. May I request some examples to make it a bit more explicit.
 
S

Steven D'Aprano

Many Thanks to you Steven, for such a concise explanation of using the
help. May I request some examples to make it a bit more explicit.

Suppose you want to get help about the max() function.

Inside IDLE, at the command prompt, type:

help(max) <ENTER>

where <ENTER> means "press the ENTER key".

If you want help about the min() function instead, type:

help(min) <ENTER>


If you have an object called "parrot", and you want to get help about
that object, do this:

help(parrot) <ENTER>

If you just want general help about everything, type:

help() <ENTER>

and follow the instructions on screen.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,291
Messages
2,571,493
Members
48,160
Latest member
KieranKisc

Latest Threads

Top