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