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


a=15
def func():
    a=20
    return
print('a=',a)

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