diff --git a/TaskX03/run b/TaskX03/run new file mode 100644 index 0000000..4bd61cb --- /dev/null +++ b/TaskX03/run @@ -0,0 +1,2 @@ +#!/bin/bash +python2 TaskX03/run.py "$@" diff --git a/TaskX03/run.py b/TaskX03/run.py new file mode 100644 index 0000000..5560742 --- /dev/null +++ b/TaskX03/run.py @@ -0,0 +1,8 @@ +import sys +import re + +pattern = '[A-Za-z]+' + +for line in sys.stdin: + match = re.match(pattern, line).group(0) + print str(len(match))+" "+match