1 | initial version |
In Python, you can use the built-in function help()
or the __doc__
attribute to inspect the contents of a function.
For example, to inspect the print()
function:
help(print)
or
print.__doc__
Alternatively, you can use the dir()
function to list all the attributes and methods of an object, including functions:
dir(print)
This will give you a more general overview of the function, including any properties or methods it has.