About 17,500,000 results
Open links in new tab
  1. Python String find() Method - W3Schools

    The find() method finds the first occurrence of the specified value. The find() method returns -1 if the value is not found. The find() method is almost the same as the index() method, the only difference is that the index() method raises an exception if the …

  2. Python String find() Method - GeeksforGeeks

    Oct 27, 2024 · What is find() Method? The find() method in Python returns the index of the first occurrence of a substring within a given string. If the substring is not found, it returns -1. This method is case-sensitive, which means “ abc ” is treated differently from “ ABC “. Syntax of find() Method. s.find(substring, start, end)) Parameter:

  3. How to Use the find() Function in Python? - Python Guides

    Jan 8, 2025 · Learn how to use Python's `find()` function to locate substrings within a string. This tutorial covers syntax, examples, and tips for efficient string searching.

  4. Python String find(): How to Find a Substring in a String Effectively

    Use Python string find() to find a substring in a string. The find() method returns -1 if the substring is not found.

  5. Python String find() Method with Examples

    Jan 24, 2024 · The find() method in Python is a built-in string method used to locate the index of the first occurrence of a specified substring within a string. It returns the index of the first character of the first occurrence of the substring, or -1 if the substring is not found. string: The original string where you want to search for the substring.

  6. Python String find() Method - PyTutorial

    Oct 18, 2024 · The find() method in Python is a versatile tool for locating substrings within strings. It allows you to search with precision by specifying a range and provides a straightforward way to determine if a substring exists.

  7. Python string.find() : Syntax, Usage, and Examples - mimo.org

    The Python string.find() method returns the lowest index where the substring appears. If the substring isn’t found, it returns -1. This makes it ideal for tasks like input validation, keyword detection, or search features in your programs. How to Use Python string.find() The basic syntax looks like this: Copy Code. string.find(substring ...

  8. Python String find() Method with Examples - Guru99

    Aug 12, 2024 · Python String find() is a function available in Python library to find the index of the first occurrence of a substring from the given string. The string find() function will return -1 instead of throwing an exception, if the specified substring is not present in the given string.

  9. Python String Find Method - Online Tutorials Library

    The python string find () method is used to return the index of the created string where the substring is found. Basically, it helps us to find out if the specified substring is present in the input string. This method takes the substring that is to be found as a mandatory parameter.

  10. A Comprehensive Guide To Python String find() Method

    Feb 6, 2024 · The Python String find() method is a powerful tool for searching for a specific substring within a given string. This method returns the index of the first occurrence of the substring, or -1 if the substring is not found.

  11. Some results have been removed
Refresh