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