Level 10 : Output of this code?


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

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