Level 9 : What will be the output?


a = [1, 2, 3]
b = a
a += [4, 5]
print(a, b)

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