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


y = 10
x = y += 2
print(x)

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