Level 6 : What will be the output of the following code snippet?


day = ["Sunday", "Monday", "Tuesday", "Wednesday"];
print(day[-3:-1])

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