Why do I have a syntax error?

def substring_between_letters(word, start, end):
mystring = [word.find(start)-1:word.find(end)]:
return mystring
I think this should work but im getting a syntax error.

This worked just fine for me:

Write your substring_between_letters function here:

def substring_between_letters(word, start, end):
s = word.find(start) + 1
e = word.find(end)
if s < 0 or e < 0:
return word
return word[s:e]

Uncomment these function calls to test your tip function:

print(substring_between_letters(“apple”, “p”, “e”))

should print “pl”

print(substring_between_letters(“apple”, “p”, “c”))

should print “apple”