DOCSTRING:
v Docstring is short for documentation
string.
v It is a string that occurs as the first
statement in a module, function, class, or method definition. We must write
what a function/class does in the docstring.
v Triple
quotes are used while writing
docstrings.
functionname__doc.__
def double(num):
"""Function
to double the value"""
return 2*num
>>>
print(double.__doc__)
Function to double the value
Related Topics
Privacy Policy, Terms and Conditions, DMCA Policy and Compliant
Copyright © 2018-2023 BrainKart.com; All Rights Reserved. Developed by Therithal info, Chennai.