Level 9 : What is the output of the following code?


def outer_fun(a, b):
    def inner_fun(c, d):
        return c + d
    return inner_fun(a, b)

res = outer_fun(10, 10)
print(res)

Author: anusha | Tags: function | 1736+ Python FAQs | Share
postfix | functional-programming | bitwise-operator | indentation | fabs-function | dictionaries | loop-control | interpreter | exponentiation | assignment-operator | datatype | precedence | logical-operator | function | else-statement | min-function | identity-operator | encoding | heap-memory | list-indexing | list | global | string-iteration | binary-operation | update | generator | floating-point-precision | comprehension | python | objects | iterator | syntax-error | polymorphism | constructor | goto-function | functions | shallow-copy | descriptors | map-function | control-flow | method | complex | lists | arithmetic-expression | command-line-parsing | indexing | string-formatting | string-method | identity-operator | pandas | random | matplotlib | destructor | memory | gil | virtual-environment | classes | pickling-&-unpickling | oop | list-vs-tuple | package-management | scientific-notation | collection | list-operation | comparison | id-function | append | assert | file_handling | benefit | class | static-method | typeerror | matrix-list-comprehension | exception-handling | attribute | rollback | type_conversion | generators | input-function | with-statement | yield | default-mutable-argument | list-comprehension | memory-management | print-statement | lambdas | precedence-and-associativity | module | file-handling | for | counter-function | basic | magic-method | split | boolean | sorted | center | loops | swapping | set-operation | version | error | call | return-statement | datetime | design-principle | pseudocode | while-and-for-loop | def | application | arithmetic-operation | condition | import-method | odd-number | context-manager | operator-or | recursion | format | debugging | built-in-function | asyncio-module | namespace | multiple-inheritance | immutable-data-type | list-comprehension | virtual-environment | mathematical-function | sum-function | conversion | numeric | list-method | python_version | global-keyword | string | nested-loop | syntax-error | string-formatting | max-min | range | filter-function | round-function | async | operators | file-handling | math | operations | built-in | python-django | function-argument | name-mangling | loop | pep | sys | version-check | __init_subclass__ | random-function | list-mutation | feature | data-structures | lambda | methods | print | dictionary | decimal | staticmethod | conditional-statement | library | integer | access-modifier | exception-handling | round | turtle | counter | input-function | variable | frozenset | collections | expression | binary | choice | function-and-scope | match | numpy | comment | min-max-function | syntax | lambda-function | logical-operation | mathematics | slicing | data-structure | recurssion | stack | expand-tab | escape-operator | inheritance | mapping-function | conditional-statement | data-type | tuple | deep-copy | zip-function | syntaxerror | sys-module | formal-and-actual-parameter | iterable | python-history | type-conversion | raise | int | string-slicing | encapsulation | software-design | slice | control-flow | overflow | factorial-function | while-loop | filter | global-variable | mysql | thread | error-handling | bitwise-operator | regex | string-method | operator-overloading | global-variable | data-structure | control-statement | list-slicing | array | implementation | sum() | __all__-attribute | object-attribute | immutability | enumerate() | complex-number | multithreading | while-else-loop | zip | operator-and | logical-operator | python-module | input | bitwise | head-and-tail | string-slicing | compute | data-type | tuple-unpacking | installation | file | parameter | inherit | string-manipulation | decorator | join | class-and-instance-variable | built-in-function | copy | statement | class-and-inheritance | sorting | __future__ | type-conversion | list-join | namedtuple | threading | operator | invalid-list | init | exception | data_structure | class-and-object | touples | multiprocessing | set | keyword | asyncio | oops | docstring | boolean-and-non-boolean | python-repl | identifier | matrix | higher-order-function | generators-in-python | math-copysign | zfill-function | operand | dicts | mutable | string-concatenation | regular-expression ...