def square( )""function documentation can we have your liver then""return * square class employee"class documentationpass print(square( )print(square __doc__the whole point of this documentation protocol is that your comments are retained for inspection in __doc__ attributes after the file is imported thusto display the docstrings associated with the module and its objectswe simply import the file and print their __doc__ attributeswhere python has saved the textimport docstrings function documentation can we have your liver thenprint(docstrings __doc__module documentation words go here print(docstrings square __doc__function documentation can we have your liver thenprint(docstrings employee __doc__class documentation note that you will generally want to use print to print docstringsotherwiseyou'll get single string with embedded \ newline characters you can also attach docstrings to methods of classes (covered in part vi)but because these are just def statements nested in class statementsthey're not special case to fetch the docstring of method function inside class within moduleyou would simply extend the path to go through the classmodule class method __doc__ (we'll see an example of method docstrings in docstring standards and priorities as mentioned earliercommon practice today recommends hash-mark comments for only smaller-scale documentation about an expressionstatementor small group of python documentation sources