djfz-2023-s464986/TaskD01/run.py

13 lines
215 B
Python
Raw Normal View History

2023-11-25 16:07:14 +01:00
import re
import sys
found_lines = []
for line in sys.stdin:
if re.search(r'\bHamlet\b', line):
found_lines.append(line.strip())
if found_lines:
print('\n'.join(found_lines), end='')