From 682b2825da27fba5cdc0e6d5ec6f6dc80298f70e Mon Sep 17 00:00:00 2001 From: "Stephen M. McQuay" Date: Sat, 8 Sep 2012 10:19:32 -0600 Subject: [PATCH] pendlepants solution --- pendlepants/pendlepants.py | 9 +++++++++ pendlepants/stdin1.txt | 3 +++ 2 files changed, 12 insertions(+) create mode 100644 pendlepants/pendlepants.py create mode 100644 pendlepants/stdin1.txt diff --git a/pendlepants/pendlepants.py b/pendlepants/pendlepants.py new file mode 100644 index 0000000..8a1ea1a --- /dev/null +++ b/pendlepants/pendlepants.py @@ -0,0 +1,9 @@ +import sys +from itertools import product + +options = [] +for line in sys.stdin: + options.append(line.strip().split()) + +for i in product(*options): + print ' '.join(i) diff --git a/pendlepants/stdin1.txt b/pendlepants/stdin1.txt new file mode 100644 index 0000000..6f1459f --- /dev/null +++ b/pendlepants/stdin1.txt @@ -0,0 +1,3 @@ +pendlepants turqoise +prison-stripe mesh +waldo horn-rim