jezyki-formalne/TaskB02/task2.py
2024-11-25 12:29:21 +01:00

10 lines
275 B
Python

import regex as re
with open('polish_wiki_excerpt.in', encoding='utf8') as file:
lines = file.readlines()
pattern = r'( |[Pp])ies(( \w+)|$)'
for line in lines:
line = line.strip()
x = re.search(pattern, line)
if x:
print(line)