From 197b6fecd3ae633cbc8fe90fa733f2249d44afc3 Mon Sep 17 00:00:00 2001 From: Eryk Miszczuk Date: Tue, 5 Nov 2019 11:15:24 +0100 Subject: [PATCH] Task A29 --- TaskA07/run | 2 +- TaskA29/run | 2 ++ TaskA29/run.py | 10 ++++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 TaskA29/run create mode 100644 TaskA29/run.py diff --git a/TaskA07/run b/TaskA07/run index 07a6311..c84edd2 100644 --- a/TaskA07/run +++ b/TaskA07/run @@ -1,2 +1,2 @@ #!/bin/bash -python run.py "$@" +python TaskA07/run.py "$@" diff --git a/TaskA29/run b/TaskA29/run new file mode 100644 index 0000000..afa66c0 --- /dev/null +++ b/TaskA29/run @@ -0,0 +1,2 @@ +#!/bin/bash +python TaskA29/run.py "$@" diff --git a/TaskA29/run.py b/TaskA29/run.py new file mode 100644 index 0000000..50ac866 --- /dev/null +++ b/TaskA29/run.py @@ -0,0 +1,10 @@ +import sys +import re + +regex = re.compile('^[A-Za-z_][A-Za-z0-9_]*$') + +for line in sys.stdin: + if regex.match(line.replace('\n', '')): + print('yes') + else: + print('no')