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