Finding characters in a string
def find_it(text):
index = text.find("a")
return index
Function Call | Return Value | |||
---|---|---|---|---|
find_it('Anna') | → | |||
find_it('marsupial') | → | |||
find_it(' orchestra') | → | |||
find_it('Mt. Diablo') | → | |||
find_it(' Avocado ') | → |
Experiment with this code on Gitpod.io