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