Mega Code Archive

 
Categories / Python / Buildin Function
 

The dir Function

#dir returns a list of the attributes and methods of any object: modules, functions,  #strings, lists, dictionaries-pretty much anything. li = []  print dir(li)                                             d = {}  print dir(d)