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