I have two strings of equal length, how can I find all the locations where the strings are different?
For example, \"HELPMEPLZ\" and \"HELPNEPLX\" are different at p
>>> from itertools import izip >>> s1 = 'HELPMEPLZ' >>> s2 = 'HELPNEPLX' >>> [i for i,(a1,a2) in enumerate(izip(s1,s2)) if a1!=a2] [4, 8]