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