code: def match_strings(str1, str2):
      
      i = 0
      min_len = len(str1) if len(str1) < len(str2) else len(str2)
      while i < min_len and str1[i] == str2[i]: i += 1
      return i
docs: Returns the largest index i such that str1[:i] == str2[:i]