djfz-24_25/TaskA01/task1.py
2024-10-28 12:35:55 +01:00

12 lines
312 B
Python

with open("shakespeare.in", encoding="utf8") as f:
lines = f.readlines()
for line in lines:
line = line.strip()
line = line.split()
for word in line:
if word[:6] == "Hamlet":
result = " ".join(line)
print(result)
break