w3resource

Python: Documentation of a built-in-function


'builtins' module provides direct access to all 'built-in' identifiers of Python.
Write a Python program that imports the abs() function using the builtins module, displays the documentation of the abs() function and finds the absolute value of -155.

Sample Solution:

Python Code:

import builtins 
help(builtins.abs)
print(builtins.abs(-155))

Sample Output:

Help on built-in function abs in module builtins:

abs(x, /)
    Return the absolute value of the argument.

155

Flowchart:

Flowchart: Documentation of a built-in-function.

Python Code Editor:

Contribute your code and comments through Disqus.

Previous: Write a Python program to create an instance of a specified class and display the namespace of the said instance.
Next: Define a Python function student(). Using function attributes display the names of all arguments.

What is the difficulty level of this exercise?

Test your Programming skills with w3resource's quiz.



Follow us on Facebook and Twitter for latest update.