djfz-2023-s464933/TaskD01/run.py

11 lines
189 B
Python
Raw Normal View History

2023-12-17 21:57:50 +01:00
import re
import sys
def re_find_hamlet(input):
for _, l in enumerate(input, start=1):
if re.search(r'\bHamlet\b', l):
print(l.strip())
re_find_hamlet(sys.stdin)