For future reference (don't have to change):
* in python 2.7 xrange is generally better than range since it doesn't allocate a list (python 3 fixes this)
* result = sum((i + 1) * abs(ord(a[i]) - ord(b[i])) for i in xrange(minlen))