i1 = input() i2 = input() m, n = len(i1), len(i2) # cost add, cost delete, cost remove ca, cd, cr = 1, 1, 1 dp = [[0 for _ in range(n+1)] for _ in range(m+1)] for i in range(n+1): dp[0][i] = i for j in range(m+1): dp[j][0] = j for i in range(1,m+1): for j in range(1,n+1): ...