Level 10 : What is the output?


x = [1, 2, 3]
y = x
x = x + [4, 5]
print(y)

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