Mega Code Archive

 
Categories / Python Tutorial / Buildin Function
 

Dir function returns a list of the attributes and methods of any object

li = []  print dir(li)                                    d = {}  print dir(d)                                          import math dir(math)