This commit is contained in:
LuminoX 2025-01-29 02:08:57 +01:00
parent 8c0af38006
commit dab5c629c6
2 changed files with 7 additions and 4 deletions

View File

@ -12,6 +12,9 @@ with open('polish_wiki_excerpt.in', encoding='utf8') as file:
line = line.replace('\n', '')
x = re.findall(pattern, line)
if "Nikołaj Judenicz" in line:
pass
a = 0
b = 0
c = 0
@ -28,7 +31,7 @@ with open('polish_wiki_excerpt.in', encoding='utf8') as file:
elif words[2] != '':
matching = words[2]
c += len(matching)
d = len(line) - a - b - c
d = len(line) - a - b - c
print(a, b, c, d)
final.append([a, b, c, d])

View File

@ -1,7 +1,7 @@
with open("./TaskD01/polish_wiki_excerpt.out", 'r', encoding='utf8') as f:
with open("./TaskD02/polish_wiki_excerpt.out", 'r', encoding='utf8') as f:
lines1 = f.readlines()
with open("./TaskD01/polish_wiki_excerpt.exp", 'r', encoding='utf8') as f:
with open("./TaskD02/polish_wiki_excerpt.exp", 'r', encoding='utf8') as f:
lines2 = f.readlines()
i = 1
@ -10,7 +10,7 @@ for line1, line2 in zip(lines1, lines2):
pass
# print('hurray')
else:
print(f'{i}: bad')
print(f'{i}: bad: \n{line1}{line2}')
i += 1