This commit is contained in:
Adam 2020-12-06 15:39:09 +01:00
parent 74270b7f6b
commit d2df7eb2f2
3 changed files with 13 additions and 0 deletions

0
TaskD02/Makefile Normal file
View File

2
TaskD02/run Normal file
View File

@ -0,0 +1,2 @@
#!/bin/bash
python TaskD02/run.py "$@"

11
TaskD02/run.py Normal file
View File

@ -0,0 +1,11 @@
import re
import sys
for line in sys.stdin:
A = len(re.findall(r'[a-ząćęłńóśźż]', line))
B = len(re.findall(r'[A-ZĄĆĘŁŃÓŚŹŻ]', line))
C = len(re.findall(r'\d', line))
line = line.rstrip('\n')
D = len(line) - A - B - C
sys.stdout.write(f"{A} {B} {C} {D}\n")