Upload files to "TaskB01"

This commit is contained in:
Stanislav Lytvynenko 2025-02-03 00:47:07 +01:00
parent 1c636fa8e8
commit b428fda1b0

11
TaskB01/run.py Normal file
View File

@ -0,0 +1,11 @@
input_file = 'shakespeare.exp'
with open(input_file, 'r', encoding='utf-8') as file:
lines = file.readlines()
for i, line in enumerate(lines, start=1):
if 'Hamlet' in line or 'hamlet' in line:
print(f"{i}: {line.strip()}")