-
Notifications
You must be signed in to change notification settings - Fork 0
/
otherMatch.py
37 lines (34 loc) · 1.06 KB
/
otherMatch.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
with open("otherRaw.txt","r") as inputFile, open("AODATA00.txt","r") as matchFile, open("uniqueOTHER.txt","a") as outputFile:
errors = 0
matches = 0
total = 0
for line in inputFile:
total += 1
suspectLine = line
unique = True
matchLine = "derp"
for line in matchFile:
matchLine = line
match = True
for x in range(len(matchLine)):
#print(matchLine[x])
if suspectLine[x] == matchLine[x]:
match = match and True
else:
match = match and False
break
if match:
#print(len(suspectLine))
unique = False
matches += 1
break
if unique == True:
outputFile.write(suspectLine)
#print(total)
inputFile.close()
matchFile.close()
outputFile.close()
print("errors = ",errors)
print("matches = ", matches)
print("total cases = ",total)
raise SystemExit