aboutsummaryrefslogtreecommitdiff
path: root/challenge-242/eric-cheung/python/ch-2.py
diff options
context:
space:
mode:
Diffstat (limited to 'challenge-242/eric-cheung/python/ch-2.py')
-rwxr-xr-xchallenge-242/eric-cheung/python/ch-2.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/challenge-242/eric-cheung/python/ch-2.py b/challenge-242/eric-cheung/python/ch-2.py
new file mode 100755
index 0000000000..9d487ad23a
--- /dev/null
+++ b/challenge-242/eric-cheung/python/ch-2.py
@@ -0,0 +1,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)