Hello,
For some the if statement is not hit and only the last print statement [number of iterations is shown.
The intention is what elements of List-ACI-nodes are not part of List-vrf-nodes:
file=open ("List-vrf-nodes.txt")
count=0
testList=[]
for line in file:
#rstrip to remove "\n"
testList.append(line.rstrip())
file2=open ("List-ACI-nodes.txt")
for keyword in file2:
count=count+1
print(keyword)
print ("list:",str(testList))
if (keyword in testList
print (keyword, " in list")
else:
(keyword, " not in list")
print ("count:",count)