def hammingDist(str1, str2):
    """Returns the hamming distance between the two equal-length strings."""
    assert (len(str1) == len(str2))
    hDist = 0
    for idx in range(len(str1)):
        char1 = str1[idx]
        char2 = str2[idx]
        if (char1 != char2):
            hDist = hDist + 1
    return hDist