diff options
| author | 冯昶 <fengchang@novel-supertv.com> | 2023-12-11 18:11:32 +0800 |
|---|---|---|
| committer | 冯昶 <fengchang@novel-supertv.com> | 2023-12-11 18:11:32 +0800 |
| commit | e94f52525bf99cded9ba76e696b691c7a657500b (patch) | |
| tree | 4e614b7233580b0aee9c58e23e87eff5e9331aee /challenge-246/packy-anderson/python/ch-1.py | |
| parent | 4ac02978fd0732a7fcc61a9def95e1e08100e4c9 (diff) | |
| parent | 98df168725aa587bd4db1e24018dae1ca77b29da (diff) | |
| download | perlweeklychallenge-club-e94f52525bf99cded9ba76e696b691c7a657500b.tar.gz perlweeklychallenge-club-e94f52525bf99cded9ba76e696b691c7a657500b.tar.bz2 perlweeklychallenge-club-e94f52525bf99cded9ba76e696b691c7a657500b.zip | |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'challenge-246/packy-anderson/python/ch-1.py')
| -rwxr-xr-x | challenge-246/packy-anderson/python/ch-1.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/challenge-246/packy-anderson/python/ch-1.py b/challenge-246/packy-anderson/python/ch-1.py new file mode 100755 index 0000000000..035378a255 --- /dev/null +++ b/challenge-246/packy-anderson/python/ch-1.py @@ -0,0 +1,13 @@ +#!/usr/bin/env python + +from random import sample + +def sixOutOfFourtyNine(): + return sorted(sample(range(1, 49), 6)) + +def solution(): + arr = sixOutOfFourtyNine() + print( "\n".join(map(str, arr)) ) + +print('Output') +solution() |
