19 lines
360 B
Python
19 lines
360 B
Python
#!/usr/bin/python3
|
|
|
|
import sys
|
|
import re
|
|
|
|
for line in sys.stdin.readlines():
|
|
answer = re.findall('([\W]|^)[a-ząćęłńóśźż][\w]*',line)
|
|
temp = ''
|
|
if answer:
|
|
temp += (str(len(answer))+" ")
|
|
else:
|
|
temp += "0 "
|
|
answer = re.findall('([\W]|^)[A-ZĄĆĘŁŃÓŚŹŻ][\w]*',line)
|
|
if answer:
|
|
temp += str(len(answer))
|
|
else:
|
|
temp += "0"
|
|
print(temp)
|