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