Level 1 : Guess the output of the following Python code.


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

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