Level 9 : What will be printed?


a = [1, 2]
b = a + [a]
b[2][0] = 99
print(a, b)

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