Upload files to "TaskB01"
This commit is contained in:
parent
1c636fa8e8
commit
b428fda1b0
11
TaskB01/run.py
Normal file
11
TaskB01/run.py
Normal 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()}")
|
||||
|
Loading…
Reference in New Issue
Block a user