Level 1 : What will the output of the following code be?


t = (1, 2, 3)
print(t[-1::-1])

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