diff options
| author | Simon Green <mail@simon.green> | 2023-11-26 22:22:13 +1100 |
|---|---|---|
| committer | Simon Green <mail@simon.green> | 2023-11-26 22:22:13 +1100 |
| commit | 59481daad96eaa27bd9c4ecd81010941285c496e (patch) | |
| tree | 1e9170f69bded2d6f8ab292efecfcc35d8aba26a /challenge-244/sgreen/python/ch-1.py | |
| parent | d3c171ecb6715a7bd21a52fab583c4171605f5c0 (diff) | |
| download | perlweeklychallenge-club-59481daad96eaa27bd9c4ecd81010941285c496e.tar.gz perlweeklychallenge-club-59481daad96eaa27bd9c4ecd81010941285c496e.tar.bz2 perlweeklychallenge-club-59481daad96eaa27bd9c4ecd81010941285c496e.zip | |
Simon's solution to challenge 244
Diffstat (limited to 'challenge-244/sgreen/python/ch-1.py')
| -rwxr-xr-x | challenge-244/sgreen/python/ch-1.py | 14 |
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) |
