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):
        pass
Computing edit distance of DNA sequence python