0% found this document useful (0 votes)
27 views1 page

Docstrings and Function HELP

Uploaded by

halima sadouk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views1 page

Docstrings and Function HELP

Uploaded by

halima sadouk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Docstrings and Function help

Built-in function help displays the docstring from a function definition. For
example, consider this function:
def area(base, height):
"""(number, number) -> number

Return the area of a triangle with dimensions base


and height.
"""

return base * height / 2

Calling help on function area produces this output:


>>> help(area)
Help on function area in module __main__:

area(base, height)
(number, number) -> number

Return the area of a triangle with dimensions base


and height.

You might also like