Level 1 : What will be the output of the following code?


x = (2, 5, 7, 8, 3, 4, 3, 6, 9)
print(x.index(3))

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