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


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

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