Level 10 : Output of this code?


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

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