Level 9 : What is the purpose of a docstring in Python?

Author: bhavani | Tags: docstring | 1859+ Python FAQs | Share
else-statement | regular-expressions | introduction-to-multiprocessing | classes | enumerate() | file-handling | exception-handling | format | encapsulation | generator | advanced-file-operations | formatting-with-strftime | binary | class | escape-operator | async | functional-programming | assignment-operator | attribute | decimal | asyncio | default-arguments | generators-in-python | error-handling | counter | exponentiation | floating-point-precision | for | boolean | fabs-function | bitwise | conditional-statements | class-and-inheritance | debugging | global-variable | command-line-parsing | expand-tab | global | creating-and-starting-threads | boolean-masking | counter-function | built-in-function | else | file-handling | list | data-structures | __all__-attribute | anchors-(^,-$) | dictionary-methods | handling-missing-values-(fillna,-dropna) | working-with-file-paths | inherit | arbitrary-arguments-(*args,-**kwargs) | iterator | multiple-inheritance | software-design | stack | built-in | class-and-object | pickling--unpickling | datetime.date,-datetime.time,-datetime.datetime | string-slicing | slice | head-and-tail | sum() | list-vs-tuple | dictionary | sorted | loop-control | rollback | input-function | module | string-manipulation | indexing | list-method | design-principle | factorial-function | zip | gil | multiple-inheritance | time-series-with-pandas | using-the-threading-module | memory | string-slicing | immutable-data-type | data-type | condition | logical-operation | list-methods-and-slicing | membership-operators-(in,-not-in) | iterators | filtering-and-indexing | slicing | file_handling | string-method | immutability | conversion | walking-through-directories-using-os.walk() | name-mangling | id-function | mathematical-function | error-handling | while-else-loop | type-conversion-and-casting | math | using-assertions-(assertequal,-assertraises) | string-method | list-join | exception-handling | feature | while-loops | logical-operators | multithreading | creating-custom-modules | zip-function | booleans | pass | thread | __init_subclass__ | init | higher-order-function | oop | arithmetic-operation | tuple | mapping-function | data-structures-in-python | thread-synchronization | python-repl | expression | collection | interpreter | thread-safe-data-structures-(queue.queue) | indexing:-loc-vs-iloc | comment | global-keyword | list-comprehensions | swapping | access-modifier | using-else-and-finally | using-map()-for-transformations | function | update | variable | data-type-conversions | basic | operator-or | yield | managing-directories-with-os-and-shutil | intering | floats | reading:-read(),-readline(),-readlines() | complex | random | copy | tuples | single-inheritance | choice | virtual-environment | using-lists-as-stacks | constructor | def | int | sys | string-iteration | type-conversion | literal-characters-and-special-characters | typeerror | writing:-write(),-writelines() | conditional-statement | joining-and-merging-dataframes | difference-between-threads-and-processes | namespace | iterable | library | list,-set,-and-dictionary-comprehensions | global-variable | magic-method | overriding-methods | quantifiers-(*,-+,-?,-{}) | package-management | min-function | binary-operation | decorator | objects | using-os-and-pathlib-modules | precedence | dataframe-and-series-objects | static-method | asyncio-module | lists | virtual-environment | benefit | filter | precedence-and-associativity | descriptors | call | bitwise-operator | staticmethod | assignment-operators | overflow | introduction-to-threads | operators | default-mutable-argument | indentation | comparison | integers | type_conversion | sum-function | parameter | list-slicing | operand | implementation | function-argument | bitwise-operator | oops | data-structure | touples | threading | math-copysign | array | match | filter-function | list-comprehension | comprehension | mysql | version | lambda-function | unit-testing | list-comprehension | __future__ | python-module | type-conversion | loop-control-statements | string | identity-operators-(is,-is-not) | method | methods | control-statement | data-structure | lambda | pandas | python-django | encoding | destructor | split | data-type | datetime | built-in-function | list-mutation | set-operation | application | max-min | string-formatting | sorting-and-ranking | raise | min-max-function | tuple-methods | zfill-function | list-operation | aggregating-data-with-functools.reduce() | collections | using-yield-in-functions | matrix | while-and-for-loop | class-and-instance-variable | dictionaries | operations | center | syntax-error | docstring | recursion | class-decorators | python-history | string-methods | while-loop | dictionary-comprehensions | return-statement | parsing-with-strptime | multiprocessing | multiple-except-blocks | strings | syntax | operator | append | print-statement | working-with-binary-files-(rb,-wb) | reading-and-writing-large-files-efficiently | working-with-temporary-files-using-tempfile | with-statement | round | tuple-unpacking | regular-expression | python-operators | data_structure | sys-module | data-types | string-formatting | arithmetic-expression | boolean-and-non-boolean | frozenset | dicts | integer | context-manager | input | memory-management | nested-loop | turtle | complex-number | pep | operator-overloading | conditional-statement | logical-operator | matrix-list-comprehension | deep-copy | object-attribute | function-and-scope | built-in-modules | numeric | operator-and | logical-operator | defining-functions | exception | assert | opening-files-(open()) | sorting | string-concatenation | sets | why-use-multiprocessing-over-threading?-(gil) | reading-and-writing-files | datatype | installation | working-with-dates-and-times | using-join()-and-is_alive()-methods | lambdas | directory-operations | control-flow | python-syntax-and-structure | control-flow | matplotlib | recurssion | syntaxerror | import-method | functions | input-function | file | round-function | python_version | odd-number | formal-and-actual-parameter | invalid-list | heap-memory | statement | keyword | mutable | numpy | version-check | namedtuple | scientific-notation | key-value-pairs | identity-operator | range | mathematics | polymorphism | goto-function | introduction-to-python | identity-operator | map-function | shallow-copy | loop | functional-programming | join | loops | error | generators | list-indexing | inheritance | lambda-functions | raise-statement | test-discovery | pseudocode | postfix | print | identifier | syntax-error | compute | method-overloading | regex | python | set | random-function ...