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