comefrom: <qiyuangong>072_Edit_Distance_2.py
code: def minDistance( word1, word2):
      ls_1, ls_2 = len(word1), len(word2)
      dp = list(range(ls_1 + 1))
      for j in range(1, ls_2 + 1):
          pre = dp[0]
          dp[0] = j
          for i in range(1, ls_1 + 1):
              temp = dp[i]
              if word1[i - 1] == word2[j - 1]:
                  dp[i] = pre
              else:
                  dp[i] = min(pre + 1, dp[i] + 1, dp[i - 1] + 1)
              pre = temp
      return dp[ls_1]
masked: def sample_funcname ( var_0 , var_1 ) :
      var_2 , var_3 = len ( var_0 ) , len ( var_1 )
      var_4 = list ( range ( var_2 + 1 ) )
      for var_5 in range ( 1 , var_3 + 1 ) :
          var_6 = var_4 [ 0 ]
          var_4 [ 0 ] = var_5
          for var_7 in range ( 1 , var_2 + 1 ) :
              var_8 = var_4 [ var_7 ]
              if var_0 [ var_7 - 1 ] == var_1 [ var_5 - 1 ] :
                  var_4 [ var_7 ] = var_6
              else :
                  var_4 [ var_7 ] = min ( var_6 + 1 , var_4 [ var_7 ] + 1 , var_4 [ var_7 - 1 ] + 1 )
              var_6 = var_8
      return var_4 [ var_2 ]
  