Home / Python Tips Generated By ChatGPT / Finding Substrings: find() and index() in Python Locate substrings within a string. Source Code sentence = "Look over there!" print(sentence.find("over")) print(sentence.index("there"))