Level 10 : Output of this code?


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

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