input: Write a function to find the minimum edit distance between a list of words and a target word.
  assert minEditDistance(["cat", "hat", "bed", "kyoto", "criminal", "locket", "lowest"], "copper") == 4
  assert minEditDistance(["cat", "bat", "rat"], "mat") == 1
  assert minEditDistance(["apple", "ape", "peach", "plum"], "pear") == 3
output: def minEditDistance(words, target):
      def edit_distance(word1, word2):
          dp = [[0] * (len(word2) + 1) for _ in range(len(word1) + 1)]
          
          for i in range(len(word1) + 1):
              for j in range(len(word2) + 1):
                  if i == 0:
                      dp[i][j] = j
                  elif j == 0:
                      dp[i][j] = i
                  elif word1[i-1] == word2[j-1]:
                      dp[i][j] = dp[i-1][j-1]
                  else:
                      dp[i][j] = 1 + min(dp[i-1][j], dp[i][j-1], dp[i-1][j-1])
          
          return dp[len(word1)][len(word2)]
      
      return min(edit_distance(word, target) for word in words)