diff --git a/TaskB02/task2.py b/TaskB02/task2.py index 1cd5442..8d16c27 100644 --- a/TaskB02/task2.py +++ b/TaskB02/task2.py @@ -1,7 +1,10 @@ import regex as re -with open('simple.in', encoding='utf8') as file: +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() - print(line) \ No newline at end of file + x = re.search(pattern, line) + if x: + print(line) \ No newline at end of file