Level 10 : Output of this code?


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

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