def hamming_distance(w1: str, w2: str)->int:
  """Compute the hamming distance between the given strings"""
  d = 0
  for i in range(len(w1)):
    if i >= len(w2):
      return d + len(w1) - len(w2)
    if w1[i] != w2[i]:
      d += 1
  return d