atempt 1
This commit is contained in:
parent
2b6d459794
commit
4191457413
0
TaskD02/Makefile
Normal file
0
TaskD02/Makefile
Normal file
27
TaskD02/run
Normal file
27
TaskD02/run
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
#!/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))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user