aboutsummaryrefslogtreecommitdiff
path: root/challenge-329/ysth/python
diff options
context:
space:
mode:
authorYitzchak Scott-Thoennes <sthoenna@gmail.com>2025-07-07 17:49:13 -0400
committerYitzchak Scott-Thoennes <sthoenna@gmail.com>2025-07-07 17:49:13 -0400
commita4beda300a4a06af157d83149b160d7c0995b3e2 (patch)
tree2946971318d9d0ac8c56891285c6e1eb89284d85 /challenge-329/ysth/python
parentbd7fce4bd5d085c209a213f2daca1e79799c9e87 (diff)
downloadperlweeklychallenge-club-a4beda300a4a06af157d83149b160d7c0995b3e2.tar.gz
perlweeklychallenge-club-a4beda300a4a06af157d83149b160d7c0995b3e2.tar.bz2
perlweeklychallenge-club-a4beda300a4a06af157d83149b160d7c0995b3e2.zip
challenge 329 task 1 python and perl solutions
Diffstat (limited to 'challenge-329/ysth/python')
-rw-r--r--challenge-329/ysth/python/ch-1.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/challenge-329/ysth/python/ch-1.py b/challenge-329/ysth/python/ch-1.py
new file mode 100644
index 0000000000..3ec3594967
--- /dev/null
+++ b/challenge-329/ysth/python/ch-1.py
@@ -0,0 +1,10 @@
+import sys
+import re
+
+inputs = sys.argv[1:]
+
+for string in inputs:
+ #new_string = string.translate({ c:' ' for c in range(ord('a'),ord('z')+1) })
+ #unique_integers = sorted(set(new_string.split()))
+ unique_integers = [int(i) for i in sorted(set(re.findall(r'0*(\d+)', string)))]
+ print(f'{string:<30} -> {str(unique_integers)}')