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