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