aboutsummaryrefslogtreecommitdiff
path: root/challenge-193/eric-cheung/python/ch-1.py
diff options
context:
space:
mode:
Diffstat (limited to 'challenge-193/eric-cheung/python/ch-1.py')
-rwxr-xr-xchallenge-193/eric-cheung/python/ch-1.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/challenge-193/eric-cheung/python/ch-1.py b/challenge-193/eric-cheung/python/ch-1.py
new file mode 100755
index 0000000000..5b4ca78f08
--- /dev/null
+++ b/challenge-193/eric-cheung/python/ch-1.py
@@ -0,0 +1,12 @@
+
+from itertools import product
+
+## nInput = 2 ## Example 1
+nInput = 3 ## Example 2
+
+arrStrOutput = []
+
+for arrIndx in product(range(2), repeat = nInput):
+ arrStrOutput.append("".join([str(nIndx) for nIndx in arrIndx]))
+
+print (arrStrOutput)