aboutsummaryrefslogtreecommitdiff
path: root/challenge-115/stuart-little/python/ch-2.py
diff options
context:
space:
mode:
Diffstat (limited to 'challenge-115/stuart-little/python/ch-2.py')
-rwxr-xr-xchallenge-115/stuart-little/python/ch-2.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/challenge-115/stuart-little/python/ch-2.py b/challenge-115/stuart-little/python/ch-2.py
new file mode 100755
index 0000000000..9e6792f289
--- /dev/null
+++ b/challenge-115/stuart-little/python/ch-2.py
@@ -0,0 +1,8 @@
+#!/usr/bin/env python
+
+# run <script> <space-separated digits>
+
+import re
+import sys
+
+print(attemptedOut if (int(attemptedOut := re.sub(r"(.)([13579]*)$", r"\2\1", "".join(sorted(sys.argv[1:], reverse=True)))) % 2 == 0) else "No even digits..")