-
Notifications
You must be signed in to change notification settings - Fork 6
/
main.py
42 lines (36 loc) · 1001 Bytes
/
main.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
38
39
40
41
42
def main():
numbers = list()
with open("origin.txt") as hFile:
for line in hFile.readlines():
line=line.strip()
if line :
try:
numbers.append(int(line))
except ValueError as v:
pass
pass
pass
# print(len(numbers))
fineNumber = list()
with open("test.txt") as hFile:
for line in hFile.readlines():
line=line.strip()
line=line.strip()
if not line:
continue
if not line.startswith("{"):
continue
pos = line.index("}",1)
line = line[1:pos]
try:
fineNumber.append(int(line))
except ValueError as v:
pass
# print(len(fineNumber))
for n in fineNumber:
if n not in numbers:
print (n)
return
if __name__ == "__main__":
main()
print("finished")