aboutsummaryrefslogtreecommitdiff
path: root/challenge-242/eric-cheung/python/ch-2.py
blob: 9d487ad23a40dff2175b0660d91edd2e2c08305a (plain)
1
2
3
4
5
6
7
8
9
10
11
arrMatrix = [[1, 1, 0], [0, 1, 1], [0, 0, 1]]  ## Example 0
## arrMatrix = [[1, 1, 0], [1, 0, 1], [0, 0, 0]]  ## Example 1
## arrMatrix = [[1, 1, 0, 0], [1, 0, 0, 1], [0, 1, 1, 1], [1, 0, 1, 0]]  ## Example 2

arrOutput = []

for arrLoop in arrMatrix:
    arrOutput.append([1 - nLoop for nLoop in arrLoop[::-1]])

print (arrOutput)