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