djfz-2020-s450026/TaskA02/A02.py

21 lines
424 B
Python
Raw Normal View History

2020-11-08 15:49:37 +01:00
import sys
def contains_pies(string):
string = string.lower()
if string.startswith("pies "):
return True
elif string.endswith(" pies"):
return True
elif " pies " in string:
return True
elif string.rstrip("\n") == "pies":
return True
else:
return False
for line in sys.stdin:
if contains_pies(line):
print(line.rstrip("\n"))