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