Google News
logo
Python - Interview Questions
How can I find methods or attributes of an object in Python?
Built­in dir() function of Python ,on an instance shows the instance variables as
well as the methods and class attributes defined by the instance’s class and all its base classes alphabetically. So by any object as argument to dir() we can find all the methods & attributes of the object’s class
Advertisement