From 512f3adff4cd4c56868a3caed4ce4596837100c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrik=20Pavli=C5=A1in?= Date: Thu, 4 Nov 2021 13:40:03 +0000 Subject: [PATCH] Update 'pages/students/2016/patrik_pavlisin/dp2022/prepare-data.sh' --- .../2016/patrik_pavlisin/dp2022/prepare-data.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pages/students/2016/patrik_pavlisin/dp2022/prepare-data.sh b/pages/students/2016/patrik_pavlisin/dp2022/prepare-data.sh index e69de29bb2..1e58c27fe8 100644 --- a/pages/students/2016/patrik_pavlisin/dp2022/prepare-data.sh +++ b/pages/students/2016/patrik_pavlisin/dp2022/prepare-data.sh @@ -0,0 +1,11 @@ +import sys + +for l in sys.stdin: + line = l.rstrip() + tokens = line.split() + result = [] + for token in tokens: + items = token.split("|") + print(items) + result.append(items[0]) + print(" ".join(result)) \ No newline at end of file