Suppose I have two strings of equal length:
s1 = 'tommy'
s2 = 'tammi'
How would I write a function that would return the index of the mismatch, like so:
s1 = 'tommy'
s2 = 'tammi'
mismatch = Get_Misalignment_Index(s1, s2)
print(mismatch)
[1, 4]
But could also handle missing or inserted charactors:
s3 = 'drain'
s4 = 'rains'
gaps = Get_Misalignment_Index(s3, s4)
print(gaps)
[0, 5]
Is this task doable in python?