This commit is contained in:
Adam 2020-12-06 15:46:34 +01:00
parent d2df7eb2f2
commit 00b48fc78f
3 changed files with 21 additions and 0 deletions

0
TaskD03/Makefile Normal file
View File

2
TaskD03/run Normal file
View File

@ -0,0 +1,2 @@
#!/bin/bash
python TaskD03/run.py "$@"

19
TaskD03/run.py Normal file
View 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))