You are here: Home / Topics / program to print the documents (syntax, description etc.) of Python built-in function(s)

program to print the documents (syntax, description etc.) of Python built-in function(s)

Filed under: Python on 2023-09-18 07:01:06

In Python, __doc__ is a special attribute that contains the documentation string for a module, class, function, or method. The documentation string is a brief description of the object and is often used to provide documentation for the object in the Python documentation.

Sample function: abs()


print(abs.__doc__)     

Output:

Return the absolute value of the argument. 


About Author:
M
Mr. Dubey     View Profile
Founder of MCQ Buddy. I just like to help others. This portal helps students in getting study material free. Share your stuff here so that others can get benefitted.