Level 10 : What will be the output of the following Python code? print("abcdef".find("cd"))

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