>A Byte of Python

The dir() function

You can use the built-in dir function to list the identifiers that a module defines. The identifiers are the functions, classes and variables defined. When you supply a module name to the dir() function, it returns the list of the names defined in that module. When no argument is supplied to it, it returns the list of names defined in the current module.