input: Write a function to calculate the Hamming distance between two strings.
  assert hamming_distance("karolin", "kathrin") == 3
  assert hamming_distance("karolin", "kerstin") == 3
  assert hamming_distance("1011101", "1001001") == 2
  assert hamming_distance("2173896", "2233796") == 3
output: def hamming_distance(str1, str2):
      if len(str1) != len(str2):
          raise ValueError("Strings must be of the same length")
      return sum(ch1 != ch2 for ch1, ch2 in zip(str1, str2))