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