atempt 1
This commit is contained in:
parent
4191457413
commit
b3f0171aeb
0
TaskD03/Makefile
Normal file
0
TaskD03/Makefile
Normal file
18
TaskD03/run
Normal file
18
TaskD03/run
Normal 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)
|
Loading…
Reference in New Issue
Block a user