Upload files to 'TaskD01'
This commit is contained in:
parent
dc2dc557d1
commit
2d8a843df2
5
TaskD01/description.txt
Normal file
5
TaskD01/description.txt
Normal 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
13
TaskD01/run.py
Normal 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
2
TaskD01/simple.exp
Normal file
@ -0,0 +1,2 @@
|
||||
Here comes Hamlet
|
||||
Hamlet Hamlet again
|
3
TaskD01/simple.in
Normal file
3
TaskD01/simple.in
Normal file
@ -0,0 +1,3 @@
|
||||
Here comes Hamlet
|
||||
ABC
|
||||
Hamlet Hamlet again
|
2
TaskD01/simple.out
Normal file
2
TaskD01/simple.out
Normal file
@ -0,0 +1,2 @@
|
||||
Here comes Hamlet
|
||||
Hamlet Hamlet again
|
Loading…
Reference in New Issue
Block a user