Level 1 : What will this code output?


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

Author: SandhyaR | Tags: list | 1736+ Python FAQs | Share
invalid-list | pep | file_handling | gil | iterable | sys | python-repl | multiple-inheritance | set-operation | return-statement | string-method | loop | higher-order-function | random | identifier | tuple-unpacking | multiprocessing | recurssion | lists | set | keyword | method | identity-operator | max-min | zip | command-line-parsing | assert | pandas | touples | file-handling | string-manipulation | math-copysign | sum() | operator-overloading | destructor | __init_subclass__ | implementation | list | dictionary | list-operation | while-else-loop | matrix | global-variable | application | def | input-function | with-statement | asyncio | factorial-function | conversion | min-max-function | feature | dictionaries | control-flow | for | mathematics | mathematical-function | inherit | string-method | classes | boolean | operator | comparison | data-type | immutability | built-in | exception | call | postfix | mutable | string-concatenation | bitwise-operator | polymorphism | syntaxerror | filter-function | exponentiation | nested-loop | enumerate() | complex-number | version-check | list-slicing | format | staticmethod | pseudocode | context-manager | memory | object-attribute | int | operator-or | function-argument | matrix-list-comprehension | type-conversion | access-modifier | control-statement | array | installation | __all__-attribute | list-mutation | sorted | counter-function | memory-management | overflow | built-in-function | lambdas | slicing | generator | lambda-function | sorting | counter | syntax | fabs-function | copy | encapsulation | type-conversion | async | arithmetic-expression | complex | generators-in-python | init | class-and-inheritance | class | identity-operator | regex | operators | else-statement | string-formatting | default-mutable-argument | id-function | append | lambda | choice | deep-copy | match | string | indexing | scientific-notation | dicts | conditional-statement | objects | threading | precedence-and-associativity | list-join | list-method | odd-number | python-django | global | function | oop | library | software-design | random-function | multithreading | turtle | split | operations | design-principle | python-history | python_version | datatype | package-management | class-and-object | logical-operation | bitwise-operator | print-statement | sys-module | filter | __future__ | loop-control | conditional-statement | functional-programming | tuple | mapping-function | import-method | goto-function | mysql | join | zfill-function | interpreter | list-indexing | parameter | string-slicing | assignment-operator | shallow-copy | matplotlib | zip-function | input-function | asyncio-module | slice | while-loop | input | yield | frozenset | decorator | operator-and | debugging | encoding | file-handling | name-mangling | namespace | statement | numeric | collection | map-function | sum-function | type_conversion | math | compute | inheritance | generators | comprehension | numpy | raise | while-and-for-loop | precedence | recursion | file | range | center | constructor | pickling-&-unpickling | version | loops | built-in-function | typeerror | floating-point-precision | heap-memory | list-comprehension | static-method | logical-operator | python-module | operand | python | binary-operation | global-keyword | thread | stack | data_structure | syntax-error | swapping | namedtuple | update | module | round | syntax-error | data-structure | collections | formal-and-actual-parameter | error-handling | virtual-environment | print | global-variable | data-structure | data-structures | attribute | expand-tab | decimal | string-iteration | functions | descriptors | docstring | list-vs-tuple | methods | class-and-instance-variable | function-and-scope | virtual-environment | basic | rollback | string-slicing | arithmetic-operation | datetime | integer | string-formatting | head-and-tail | logical-operator | comment | immutable-data-type | control-flow | magic-method | binary | round-function | indentation | benefit | regular-expression | exception-handling | boolean-and-non-boolean | data-type | expression | escape-operator | condition | error | exception-handling | list-comprehension | oops | min-function | bitwise | variable | iterator ...