Python_Institute
PCPP-32-101 · Question #54
Which function can be used to get a list of methods inherent to an object?
The correct answer is C. dir(). The dir() function returns a list of the attributes and methods of an object, including those
Advanced OOP
Question
Which function can be used to get a list of methods inherent to an object?
Options
- Adict()
- Bhelp()
- Cdir()
- Ddict()
How the community answered
(35 responses)- A3% (1)
- B3% (1)
- C89% (31)
- D6% (2)
Explanation
The dir() function returns a list of the attributes and methods of an object, including those
Topics
#dir()#introspection#object methods#built-in functions
Community Discussion
No community discussion yet for this question.