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