13 lines
287 B
Python
13 lines
287 B
Python
|
import re
|
||
|
import sys
|
||
|
|
||
|
|
||
|
def count_words(string):
|
||
|
capital = len(re.findall(r"\b[A-ZĄĆĘŁŃÓŚŹŻ]+\w*", string))
|
||
|
lower = len(re.findall(r"\b[a-ząćęłńóśźż]+\w*", string))
|
||
|
return str(lower) + " " + str(capital)
|
||
|
|
||
|
|
||
|
for line in sys.stdin:
|
||
|
print(count_words(line))
|