Question: how to calculate hamming distance in python?
Answer: check the length of the strings so we know how many characters we need to compare. look at each pair of corresponding characters in turn by looping over the indices. for each pair of characters that are not the same, add 1 to the Hamming distance. return the final count.