djfz-2020-s444399/TaskD03/run

17 lines
349 B
Plaintext
Raw Normal View History

2020-12-05 13:12:41 +01:00
#!/usr/bin/python3
import sys
import re
for input in sys.stdin.readlines():
answer = re.findall('([\W]|^)[a-ząćęłńóśźż][\w]*',input)
if answer:
print(str(len(answer))+" ", end="")
else:
print("0 ", end="")
answer = re.findall('([\W]|^)[A-ZĄĆĘŁŃÓŚŹŻ][\w]*',input)
if answer:
print(str(len(answer)))
else:
print("0")