This is the behaviour I want:
a: IGADKYFHARGNYDAA
c: KGADKYFHARGNYEAA
2 difference(s).
Python has the excellent difflib, which should provide the needed functionnality.
Here's sample usage from the documentation:
import difflib # Works for python >= 2.1
>>> s = difflib.SequenceMatcher(lambda x: x == " ",
... "private Thread currentThread;",
... "private volatile Thread currentThread;")
>>> for block in s.get_matching_blocks():
... print "a[%d] and b[%d] match for %d elements" % block
a[0] and b[0] match for 8 elements
a[8] and b[17] match for 21 elements
a[29] and b[38] match for 0 elements