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