input: def compute_edit_distance(string1: str, string2: str) -> int:
      """Compute the edit distance (Levenshtein distance) between two strings.
      The function uses dynamic programming to calculate the minimum number of 
      single-character edits (insertions, deletions or substitutions) required 
      to change one string into the other.
      >>> compute_edit_distance("kitten", "sitting")
      3
      """
output:     if not string1:
          return len(string2)
      if not string2:
          return len(string1)
      
      dp = [[0] * (len(string2) + 1) for _ in range(len(string1) + 1)]
      
      for i in range(len(string1) + 1):
          dp[i][0] = i
      for j in range(len(string2) + 1):
          dp[0][j] = j
      
      for i in range(1, len(string1) + 1):
          for j in range(1, len(string2) + 1):
              if string1[i-1] == string2[j-1]:
                  dp[i][j] = dp[i-1][j-1]
              else:
                  dp[i][j] = min(dp[i-1][j], dp[i][j-1], dp[i-1][j-1]) + 1
      
      return dp[len(string1)][len(string2)]