I have some code to find the differences between strings. At the moment it works for strings of the same length, but I am trying to get it to work for strings of different length. How can I do this
I added in a new variable longest_seq
to try and work around this but I'm not sure how to use it.
ref_seq = "pandabears"
map_seq = "pondabear"
longest_seq = map_seq
if len(ref_seq) > len(map_seq):
longest_seq == ref_seq
for i in range(len(longest_seq)):
if ref_seq[i] != map_seq[i]:
print i, ref_seq[i], map_seq[i]