From 17a6e55dcdbcec70b03018b3b50319777149525f Mon Sep 17 00:00:00 2001 From: Walt Mankowski Date: Sat, 4 Jul 2020 15:08:23 -0400 Subject: python 3 code for challenge 67 These turned out to be a lot simpler than my Perl versions, in large part because you don't have to worry about references in Python. --- challenge-067/walt-mankowski/python/ch-1.py | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 challenge-067/walt-mankowski/python/ch-1.py (limited to 'challenge-067/walt-mankowski/python/ch-1.py') diff --git a/challenge-067/walt-mankowski/python/ch-1.py b/challenge-067/walt-mankowski/python/ch-1.py new file mode 100644 index 0000000000..83b9cd47dd --- /dev/null +++ b/challenge-067/walt-mankowski/python/ch-1.py @@ -0,0 +1,7 @@ +from sys import argv +from itertools import combinations + +m, n = [int(x) for x in argv[1:]] +it = combinations(range(1,m+1), n) +combs = [comb for comb in it] +print(combs) -- cgit