From b996cb9eb1468f48bed6897209e9b88330c8885c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zofia=20B=C4=85czyk?= Date: Sun, 6 Dec 2020 18:12:54 +0100 Subject: [PATCH] atempt 1 --- TaskD05/Makefile | 0 TaskD05/run | 8 ++++++++ 2 files changed, 8 insertions(+) create mode 100644 TaskD05/Makefile create mode 100644 TaskD05/run diff --git a/TaskD05/Makefile b/TaskD05/Makefile new file mode 100644 index 0000000..e69de29 diff --git a/TaskD05/run b/TaskD05/run new file mode 100644 index 0000000..02ad573 --- /dev/null +++ b/TaskD05/run @@ -0,0 +1,8 @@ +#!/usr/bin/python3 + +import sys +import re + +for line in sys.stdin.readlines(): + print((re.sub('(([\W]*[\w\d]+[\W]+[\w\d]+[\W]+)([\w\d]+)(.*$))', lambda m: m.group(2)+'x'*len(m.group(3))+m.group(4), line)).strip('\n')) +