Strings In Depth1 / 19
Up next

Search a string

s = "hello world"
print("world" in s)
print(s.find("o"))        # first index, or -1
print(s.startswith("hello"))
print(s.endswith("!"))
What you're solving

in, find, startswith, endswith