Level 10 : What is the result of the following code?


t = (1, 2, 3)
print(t.index(4))

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