djfz-2020-s444507/TaskD03/run.py

20 lines
257 B
Python
Raw Normal View History

2020-12-06 15:46:34 +01:00
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))