Which of the following is a feature of Python DocString?

Questions & AnswersCategory: Programming LanguageWhich of the following is a feature of Python DocString?
Geek Boy Staff asked 2 years ago

Which of the following is a feature of Python DocString?
a. In Python all functions should have a docstring
b. Docstrings can be accessed by the __doc__ attribute on objects
c. It provides a convenient way of associating documentation with Python modules
functions
classes
and methods
d. All of the mentioned

1 Answers
Geek Boy Staff answered 2 years ago

d. All of the mentioned
Explanation: Python has a nifty feature called documentation strings, usually referred to by its shorter name docstrings. DocStrings are an important tool that you should make use of since it helps to document the program better and makes it easier to understand.