Level 10 : Output of this code?


lst = [[0]*3]*3
lst[0][0] = 1
print(lst)

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