Zadanie C38
This commit is contained in:
parent
85d7420722
commit
a26aa0ddff
14
TaskC38/C38.py
Normal file
14
TaskC38/C38.py
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
import re
|
||||||
|
import sys
|
||||||
|
|
||||||
|
|
||||||
|
def line_contains(line):
|
||||||
|
if re.match("(^(al\.|os\.) ([A-Z].*) ([1-9](\d+)?)((\/\d+)|( m. [1-9])))|(^(ul\.) ([A-Z].*) ([1-9](\d+)?))", line):
|
||||||
|
return re.findall("^(al\.|os\.|ul\.) ([A-Z][.\S]*) ([1-9](\d+)?)", line)[0][2]
|
||||||
|
|
||||||
|
|
||||||
|
for line in sys.stdin:
|
||||||
|
if line_contains(line):
|
||||||
|
print(line_contains(line))
|
||||||
|
else:
|
||||||
|
print("<NONE>")
|
0
TaskC38/Makefile
Normal file
0
TaskC38/Makefile
Normal file
2
TaskC38/run
Executable file
2
TaskC38/run
Executable file
@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
python3 TaskC38/C38.py "$@"
|
Loading…
Reference in New Issue
Block a user