I need to compare two lists in a program to see if there are matching strings. One of them is a txt document that I already imported. Thats what I did
def compareLists(self, listA, listB):
sameWords = list()
for a in xrange(0,len(listA)):
for b in xrange(0,len(listB)):
if listA[a] == listB[b]:
sameWords.append(listA[a])
pass
pass
pass
return sameWords
But if I run the program it doesnt show any matches although I know that there has to be one. I think its somewhere inside the if block.