Index slicing for a string


#1

Hi,

In the exercise, Code Challenge: String Methods

I do not understand why we use +1 when we return index for start_ind

The code:

def substring_between_letters(word, start, end):
start_ind = word.find(start)
end_ind = word.find(end)
#return start_ind
if start_ind > -1 and end_ind > -1:
return(word[(start_ind+1):(end_ind)])
return word

Can anybody please explain

Thanks,