Level 10 : What does this output?


lst = [1, 2, 3]
lst = [[x for x in lst] for _ in range(3)]
lst[1][2] = 99
print(lst)

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