aboutsummaryrefslogtreecommitdiff
path: root/challenge-193/eric-cheung/python/ch-1.py
blob: 5b4ca78f088bfd7bb2d2925bfb64187df8a82001 (plain)
1
2
3
4
5
6
7
8
9
10
11
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)