14 lines
419 B
Python
14 lines
419 B
Python
|
import re
|
||
|
import sys
|
||
|
|
||
|
|
||
|
def count_chars(string):
|
||
|
lower = len(re.findall(r"[a-ząćęłńóśźż]", string))
|
||
|
capital = len(re.findall(r"[A-ZĄĆĘŁŃÓŚŹŻ]", string))
|
||
|
digit = len(re.findall(r"[0-9]", string))
|
||
|
rest = len(string) - lower - capital - digit
|
||
|
return str(lower) + " " + str(capital) + " " + str(digit) + " " + str(rest)
|
||
|
|
||
|
|
||
|
for line in sys.stdin:
|
||
|
print(count_chars(line.rstrip("\n")))
|