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


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

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