Level 9 : What will this output?


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

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