Level 10 : What does this output?


lst = [1, 2, 3, 4]
lst[1:3] = [7]
print(lst)

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