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