def get_indices_from_the_second_string(string1, string2):
\'\'\'(str, str) -> list of int
>>> get_indices_from_the_second_string(\'AGTACACGTTAC\', \'
Oh, I see what you're doing.
def get_indices_from_the_second_string(string1, string2):
acc = []
string1_index = 0
for char in string2:
while string1[string1_index] != char:
string1_index += 1
if string1_index >= len(string1):
return acc
acc.append(string1_index)
string1_index += 1
if string1_index >= len(string1):
return acc
return acc