This commit is contained in:
Zofia Bączyk 2020-12-06 18:00:40 +01:00
parent 4191457413
commit b3f0171aeb
2 changed files with 18 additions and 0 deletions

0
TaskD03/Makefile Normal file
View File

18
TaskD03/run Normal file
View File

@ -0,0 +1,18 @@
#!/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)