Level 10 : Output of this code?


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

Author: SandhyaR | Tags: list | 1736+ Python FAQs | Share
generators-in-python | parameter | file-handling | set-operation | immutability | goto-function | object-attribute | expand-tab | tuple-unpacking | encoding | dictionary | expression | lambdas | data-structures | virtual-environment | gil | python-history | comprehension | global-keyword | map-function | asyncio-module | matrix | deep-copy | statement | encapsulation | asyncio | shallow-copy | raise | conditional-statement | bitwise-operator | __all__-attribute | destructor | frozenset | version-check | def | logical-operator | string-method | python-django | function-argument | list-method | global-variable | file-handling | package-management | multithreading | zip | lambda-function | for | arithmetic-operation | bitwise | built-in-function | head-and-tail | syntax-error | scientific-notation | mutable | data-structure | string-formatting | string-formatting | return-statement | while-and-for-loop | sys | installation | variable | split | math | operator-overloading | module | exception | string-manipulation | recurssion | nested-loop | generator | exponentiation | list-vs-tuple | format | sorted | identifier | operator-and | type-conversion | regex | polymorphism | exception-handling | filter | iterator | descriptors | loop-control | decimal | min-max-function | type-conversion | python-repl | formal-and-actual-parameter | name-mangling | class-and-instance-variable | pickling-&-unpickling | syntax-error | data_structure | global | function-and-scope | bitwise-operator | collections | context-manager | round-function | input-function | methods | __future__ | __init_subclass__ | call | python_version | string-concatenation | round | memory | append | datatype | lambda | exception-handling | list-comprehension | sorting | mathematical-function | random | comparison | feature | default-mutable-argument | keyword | data-type | multiple-inheritance | file_handling | class | min-function | boolean-and-non-boolean | list-operation | regular-expression | yield | data-structure | import-method | postfix | comment | fabs-function | matrix-list-comprehension | inherit | update | string-method | condition | conversion | touples | mysql | threading | control-flow | floating-point-precision | indentation | matplotlib | complex | precedence | set | while-else-loop | overflow | lists | async | basic | syntaxerror | constructor | implementation | match | binary-operation | typeerror | input-function | tuple | thread | magic-method | method | random-function | version | function | conditional-statement | invalid-list | namespace | mapping-function | copy | iterable | decorator | counter | control-statement | binary | zfill-function | command-line-parsing | library | staticmethod | array | string-iteration | assignment-operator | software-design | compute | operator | file | swapping | global-variable | oop | higher-order-function | built-in | integer | list-slicing | complex-number | while-loop | list | int | loop | access-modifier | dictionaries | immutable-data-type | built-in-function | type_conversion | list-indexing | design-principle | arithmetic-expression | docstring | pep | math-copysign | max-min | print-statement | numpy | identity-operator | print | generators | logical-operator | numeric | collection | boolean | enumerate() | virtual-environment | class-and-inheritance | inheritance | multiprocessing | functional-programming | center | logical-operation | slicing | identity-operator | filter-function | static-method | syntax | with-statement | pseudocode | pandas | init | sys-module | join | stack | sum-function | odd-number | counter-function | turtle | input | list-mutation | operand | application | error | classes | sum() | functions | debugging | operator-or | operators | list-comprehension | datetime | dicts | data-type | zip-function | indexing | python-module | slice | attribute | string | else-statement | assert | choice | python | factorial-function | oops | mathematics | operations | escape-operator | recursion | string-slicing | error-handling | range | string-slicing | benefit | namedtuple | heap-memory | loops | list-join | memory-management | interpreter | objects | control-flow | precedence-and-associativity | class-and-object | rollback | id-function ...