push attempt
This commit is contained in:
parent
c17ac10202
commit
23ce2e2930
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 line in sys.stdin.readlines():
|
||||||
|
ctr = 0
|
||||||
|
reResult = re.findall('[a-ząćęłńóśźż]', line)
|
||||||
|
if reResult:
|
||||||
|
ctr += len(reResult)
|
||||||
|
print(str(len(reResult))+" ",end = "")
|
||||||
|
else:
|
||||||
|
print("0 ", end = "")
|
||||||
|
reResult = re.findall('[A-ZĄĆĘŁŃÓŚŹŻ]', line)
|
||||||
|
if reResult:
|
||||||
|
ctr += len(reResult)
|
||||||
|
print(str(len(reResult))+" ",end = "")
|
||||||
|
else:
|
||||||
|
print("0 ", end = "")
|
||||||
|
reResult = re.findall('[0-9]', line)
|
||||||
|
if reResult:
|
||||||
|
ctr += len(reResult)
|
||||||
|
print(str(len(reResult))+" ",end = "")
|
||||||
|
else:
|
||||||
|
print("0 ", end = "")
|
||||||
|
print(str(len(line)-1 -ctr))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user