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