The dir Function : Dir : Buildin Function : Python examples (example source code) Organized by topic

C++
PHP
Python


Python  »  Buildin Function   » [  Dir  ]  Screenshots 
 



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)                                             

           
       
Related examples in the same category
1.  dir() Function: find out which names a module defines
2.  dir() does not list the names of built-in functions and variables dir() does not list the names of built-in functions and variables
























Home| Contact Us
Copyright 2003 - 04 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.