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