source = 'abc'
def editDistance(source, target):
items1=[]
for c in range(0,len(source)):
for k in range(1,len(source)):
if (k < len(source)):
test = ord(source[k]) - ord(source[c])
items1.append(test)
return items1
I'm trying to iterate through the string and find the distance between each character in the alphabet. Hence the distance between a and b is 1 and the distance between b and c is 1. I want to print out an array of [1, 1], however, I think I'm messing up on the for loops and its printing out: [1, 2, 0, 1, -1, 0].