The dir( ) Function
Categories: Python
The dir() built-in function returns a sorted list of strings containing the names defined by a module.
The list contains the names of all the modules, variables and functions that are defined in a module. Following is a simple example −
Program :-
#!/usr/bin/python
# Import built-in module math
import math
content = dir(math)
print content