djfz-2020-s444507/TaskB01/run.py

11 lines
164 B
Python

import re
import sys
pattern = re.compile(r"^.*(Hamlet).*$")
for line in sys.stdin:
x = re.findall(pattern, line)
if x:
print(line.rstrip('\n'))