jfz-2023-s464983/TaskD02/run.py

11 lines
277 B
Python

import re
def pies_reg(file_path):
with open(file_path, 'r', encoding='utf-8') as file:
for line in file:
if (re.search("(^|\s)pies($|\s)", line, re.IGNORECASE)):
print(line.strip())
file_path = 'TaskD02\simple.in'
pies_reg(file_path)