task1 done

This commit is contained in:
Robert 2024-10-28 12:35:55 +01:00
parent 6e757f969a
commit 35dfc38168

11
TaskA01/task1.py Normal file
View File

@ -0,0 +1,11 @@
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