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