jfz-2023-s473564/TaskD02/run.py

12 lines
312 B
Python
Raw Normal View History

2023-11-27 14:34:07 +01:00
import re
def find_pies_lines(file_path):
with open(file_path, 'r',encoding = 'utf-8') as file:
for line in file:
line = line.strip()
if re.search(r'\bpies\b', line, flags=re.IGNORECASE):
print(f"{line}")
file_path = './simple.in'
find_pies_lines(file_path)