forked from miczar1/djfz-24_25
D2 fixed
This commit is contained in:
parent
8c0af38006
commit
dab5c629c6
@ -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])
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user