diff options
| author | Yitzchak Scott-Thoennes <sthoenna@gmail.com> | 2025-06-19 17:11:10 -0400 |
|---|---|---|
| committer | Yitzchak Scott-Thoennes <sthoenna@gmail.com> | 2025-06-19 17:14:02 -0400 |
| commit | dc91bfc8837467757c8ffc401fa5b56e58e148e9 (patch) | |
| tree | 0d76ebaa204cdc5146044c906672471a73eb3c44 /challenge-326/ysth/python/ch-2.py | |
| parent | 93412c7fa19e013c244e41e417def795f7aac313 (diff) | |
| download | perlweeklychallenge-club-dc91bfc8837467757c8ffc401fa5b56e58e148e9.tar.gz perlweeklychallenge-club-dc91bfc8837467757c8ffc401fa5b56e58e148e9.tar.bz2 perlweeklychallenge-club-dc91bfc8837467757c8ffc401fa5b56e58e148e9.zip | |
challenge 326 perl and python solutons by ysth
Diffstat (limited to 'challenge-326/ysth/python/ch-2.py')
| -rw-r--r-- | challenge-326/ysth/python/ch-2.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/challenge-326/ysth/python/ch-2.py b/challenge-326/ysth/python/ch-2.py new file mode 100644 index 0000000000..1e5efcb54c --- /dev/null +++ b/challenge-326/ysth/python/ch-2.py @@ -0,0 +1,6 @@ +import sys +from itertools import repeat, batched + +ints = [ int(i) for i in sys.argv[1:] ]; + +print([n for ij in batched(ints, n=2) for n in repeat(ij[1], ij[0])]) |
