1. Home
  2. Data Science
  3. Python
  4. Which built-in returns a function's documentation string…

Added 25 Nov 2026

Which built-in returns a function's documentation string in Python?

  1. info()
  2. doc()
  3. help() Correct answer
  4. manual()

Correct answer

C. help()

9 views

MCQSEXAM

Explanation

help(obj) displays the docstring; obj.__doc__ returns it as a string.

Reference

Asked in: Python Interview Functions

https://docs.python.org/3/tutorial/controlflow.html#defining-functions

Preparing for an exam?

Doubts & discussion

Not sure why the answer is C? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Python MCQs

Practise all Python MCQs

Similar MCQs