xLine = Split_Line[0]
yLine = Split_Line[1]
for i in range(1, len(xLine) + 1):
    array[i][0] = array[i - 1][0] + int(costBook['-' + xLine[i - 1]])
for i in range(1, len(yLine) + 1):
    array[0][i] = array[0][i - 1] + int(costBook[yLine[i - 1] + '-'])
for i in range(1, len(xLine) + 1):
    for j in range(1, len(yLine) + 1):
        array[i][j] = min(array[i - 1][j] + diff('-', xLine[i - 1],
            costBook), array[i][j - 1] + diff(yLine[j - 1], '-', costBook),
            array[i - 1][j - 1] + diff(yLine[j - 1], xLine[i - 1], costBook))
return array
Вычисление расстояния редактирования последовательности ДНК питона