Level 2 : Read the following Python code carefully and point out the global variables?


y, z = 1, 2
def f():
    global x
    x = y+z

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