Level 1 : What will this output?


lst = [10, 20, [30, 40], 50]
x = lst[2][1]
lst[2][0] = 99
print(lst, x)

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