do3
This commit is contained in:
parent
d2df7eb2f2
commit
00b48fc78f
0
TaskD03/Makefile
Normal file
0
TaskD03/Makefile
Normal file
2
TaskD03/run
Normal file
2
TaskD03/run
Normal file
@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
python TaskD03/run.py "$@"
|
19
TaskD03/run.py
Normal file
19
TaskD03/run.py
Normal file
@ -0,0 +1,19 @@
|
||||
import re
|
||||
import sys
|
||||
|
||||
|
||||
def check(line):
|
||||
A = len(re.findall(r'\b[a-ząćęłńóśźż]\w*\b', line))
|
||||
B = len(re.findall(r'\b[A-ZĄĆĘŁŃÓŚŹŻ]\w*\b', line))
|
||||
|
||||
return "{} {}".format(A, B)
|
||||
|
||||
for line in sys.stdin:
|
||||
print(check(line))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user