Python Programming - Classes - Discussion

Discussion Forum : Classes - General Questions (Q.No. 15)
15.
What is the primary purpose of the __doc__ attribute?
It stores the documentation string for a module, class, or function.
It is used to access the private documentation of a class.
It indicates the default values of the class attributes.
It defines the documentation for a class constructor.
Answer: Option
Explanation:
The __doc__ attribute in Python is used to access the documentation string (docstring) associated with a module, class, or function. It provides information about the purpose and usage of the code.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.