We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e68658a commit ca59185Copy full SHA for ca59185
ftest/compare_file.py
@@ -13,7 +13,7 @@ def read_file(filename):
13
def sort_line(line):
14
return ''.join(sorted(line))
15
16
-data1 = list(map(sort_line, read_file(sys.argv[1])))
+data1 = list(read_file(sys.argv[1]))
17
data2 = list(map(sort_line, read_file(sys.argv[2])))
18
data1.sort()
19
data2.sort()
@@ -24,7 +24,7 @@ def compare_file(first, second):
24
return False
25
26
for line in first:
27
- if line not in second:
+ if sort_line(line) not in second:
28
print('first differs:')
29
print('{0}'.format(line))
30
0 commit comments