This commit is contained in:
Kijowski Michał 2020-12-05 12:42:16 +01:00
parent 99dac181e4
commit e4c77e7be3
2 changed files with 26 additions and 0 deletions

0
TaskD02/Makefile Normal file
View File

26
TaskD02/run Executable file
View File

@ -0,0 +1,26 @@
#!/usr/bin/python3
import sys
import re
for input in sys.stdin.readlines():
count = 0
answer = re.findall('[a-ząćęłńóśźż]',input)
if answer:
count+=len(answer)
print(str(len(answer))+" ", end="")
else:
print("0 ", end="")
answer = re.findall('[A-ZĄĆĘŁŃÓŚŹŻ]',input)
if answer:
count+=len(answer)
print(str(len(answer))+" ", end="")
else:
print("0 ", end="")
answer = re.findall('[0-9]',input)
if answer:
count+=len(answer)
print(str(len(answer))+" ", end="")
else:
print("0 ", end="")
print(str(len(input)-1 - count))