14 lines
330 B
Python
14 lines
330 B
Python
import re
|
|
import sys
|
|
|
|
def analyze_line(line):
|
|
lowercase_words = re.findall(r'\b[a-ząćęłńóśźż]\w*\b', line)
|
|
uppercase_words = re.findall(r'\b[A-ZĄĆĘŁŃÓŚŹŻ]\w*\b', line)
|
|
|
|
result = f'{len(lowercase_words)} {len(uppercase_words)}'
|
|
return result
|
|
|
|
for line in sys.stdin:
|
|
print(analyze_line(line))
|
|
|