Level 10 : What does the return statement do in a Python function?

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