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

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