late to the party, was searching for same, as "in" is not valid, I had just created following.
def find_str(full, sub):
index = 0
sub_index = 0
position = -1
for ch_i,ch_f in enumerate(full) :
if ch_f.lower() != sub[sub_index].lower():
position = -1
sub_index = 0
if ch_f.lower() == sub[sub_index].lower():
if sub_index == 0 :
position = ch_i
if (len(sub) - 1) <= sub_index :
break
else:
sub_index += 1
return position
print(find_str("Happy birthday", "py"))
print(find_str("Happy birthday", "rth"))
print(find_str("Happy birthday", "rh"))
which produces
3
8
-1
remove lower() in case case insensitive find not needed.