nerdexam
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)
  • A
    3% (1)
  • B
    3% (1)
  • C
    89% (31)
  • D
    6% (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.

Full PCPP-32-101 Practice