I have this code here, it is supposed to remove the common letters from both the lists n1 and n2. But when i run this code it only runs once as in it removes only 'a' from both n1 and n2 and doesnt remove 'k'.
Just to clarify this code should always work on only 2 words.
name1 = "abdjek"
name2 = "doarhsnk"
n1l = list(name1)
n2l = list(name2)
for i in range(len(n1l)):
for j in range(len(n2l)):
if n1l[i] == n2l[j]:
n1l.pop(i)
n2l.pop(j)
n1l.append('0')
n2l.append('1')
Ok wait, it seems to work for the above 2 names but when i have name1 = "naveen" and name2 = "darshana" it doesnt work!