From 578b11af9cd4d10964eebbed13ab36bce5117132 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kijowski=20Micha=C5=82?= Date: Sat, 5 Dec 2020 13:12:41 +0100 Subject: [PATCH] dfgf --- TaskD03/Makefile | 0 TaskD03/run | 16 ++++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 TaskD03/Makefile create mode 100755 TaskD03/run diff --git a/TaskD03/Makefile b/TaskD03/Makefile new file mode 100644 index 0000000..e69de29 diff --git a/TaskD03/run b/TaskD03/run new file mode 100755 index 0000000..586102b --- /dev/null +++ b/TaskD03/run @@ -0,0 +1,16 @@ +#!/usr/bin/python3 + +import sys +import re + +for input in sys.stdin.readlines(): + answer = re.findall('([\W]|^)[a-ząćęłńóśźż][\w]*',input) + if answer: + print(str(len(answer))+" ", end="") + else: + print("0 ", end="") + answer = re.findall('([\W]|^)[A-ZĄĆĘŁŃÓŚŹŻ][\w]*',input) + if answer: + print(str(len(answer))) + else: + print("0")