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