djfz-2023-s464986/TaskD02/run.py

14 lines
242 B
Python
Raw Normal View History

2023-11-25 15:59:13 +01:00
import re
import sys
found_lines = []
for line in sys.stdin:
if re.search(r'\b\s*pies\s*\b', line, flags=re.IGNORECASE):
found_lines.append(line.strip())
if found_lines:
print('\n'.join(found_lines), end='')