aboutsummaryrefslogtreecommitdiff
path: root/challenge-244/sgreen/python/ch-1.py
diff options
context:
space:
mode:
Diffstat (limited to 'challenge-244/sgreen/python/ch-1.py')
-rwxr-xr-xchallenge-244/sgreen/python/ch-1.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/challenge-244/sgreen/python/ch-1.py b/challenge-244/sgreen/python/ch-1.py
new file mode 100755
index 0000000000..230798c214
--- /dev/null
+++ b/challenge-244/sgreen/python/ch-1.py
@@ -0,0 +1,14 @@
+#!/usr/bin/env python3
+
+import sys
+
+
+def main(ints):
+ solution = [sum(1 for j in ints if j < i) for i in ints]
+ print(*solution, sep=', ')
+
+
+if __name__ == '__main__':
+ # Convert input into integers
+ array = [int(n) for n in sys.argv[1:]]
+ main(array)