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