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