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