Ostatnio aktywny 6 months ago

Rewizja e9f44e88c39757ba0a72fdc4174669f68d590711

diff-check-txt.py Surowy
1file1 = "misc.txt"
2file2 = "misc1.txt"
3
4with open(file1) as f:
5 a = set(line.strip() for line in f)
6
7with open(file2) as f:
8 b = set(line.strip() for line in f)
9
10print("---- Lines in misc.txt but NOT in misc1.txt ----")
11for x in sorted(a - b):
12 print(x)
13
14print("\n---- Lines in misc1.txt but NOT in misc.txt ----")
15for x in sorted(b - a):
16 print(x)
17hwc@arch ~/m