Am trying to check the existence of a list of strings in other list, it might exist more that one time, so when I print the result am getting more then 1 occurance in the result and I want it to print each occurance one time:
This is what I have been doing so far:
for i in range (0, len(spec)):
if spec[i] in my_list:
print ("R7:You mean:",spec[i])
spec is a list of strings that am trying to test if each one of them exists in other list (my_list), strings might be duplicated in my_list ( a string could exist more than one time)
The output am getting :
R7:You mean: manège
R7:You mean: mangée
R7:You mean: manège
R7:You mean: mangée
R7:You mean: manège
R7:You mean: mangée
R7:You mean: manège
R7:You mean: mangée
R7:You mean: manège
R7:You mean: mangée
R7:You mean: manège
R7:You mean: mangée
The output am expecting:
R7:You mean: manège
R7:You mean: mangée
Am missing something I don't know what it is !