djfz-2020-s450026/TaskB02/B02.py

11 lines
214 B
Python
Raw Normal View History

2020-11-12 18:14:01 +01:00
import re
import sys
def line_contain_hamlet(line):
return re.search('pies\s|pies\s|\spies\s', line, re.IGNORECASE)
for line in sys.stdin:
if line_contain_hamlet(line):
print(line.rstrip('\n'))