Upload files to 'TaskD01'

This commit is contained in:
Veronika Polevara 2023-11-25 16:07:14 +01:00
parent dc2dc557d1
commit 2d8a843df2
5 changed files with 25 additions and 0 deletions

5
TaskD01/description.txt Normal file
View File

@ -0,0 +1,5 @@
Write a program to find lines containing the word "Hamlet".
Do use regular expressions.
POINTS: 1
DEADLINE: 2023-11-26 23:59:59

13
TaskD01/run.py Normal file
View File

@ -0,0 +1,13 @@
import re
import sys
found_lines = []
for line in sys.stdin:
if re.search(r'\bHamlet\b', line):
found_lines.append(line.strip())
if found_lines:
print('\n'.join(found_lines), end='')

2
TaskD01/simple.exp Normal file
View File

@ -0,0 +1,2 @@
Here comes Hamlet
Hamlet Hamlet again

3
TaskD01/simple.in Normal file
View File

@ -0,0 +1,3 @@
Here comes Hamlet
ABC
Hamlet Hamlet again

2
TaskD01/simple.out Normal file
View File

@ -0,0 +1,2 @@
Here comes Hamlet
Hamlet Hamlet again