dir function returns a list of the attributes and methods of any object : dir « Buildin Function « Python Tutorial






li = [] 
print dir(li)                                   

d = {} 
print dir(d)                                         

import math
dir(math)








13.12.dir
13.12.1.Using dir to investigate a module
13.12.2.dir function returns a list of the attributes and methods of any object
13.12.3.apply the dir() function to a type as well as a variable
13.12.4.dir() list the entities stored within a Python object