aboutsummaryrefslogtreecommitdiff
path: root/challenge-242/eric-cheung/python/ch-1.py
diff options
context:
space:
mode:
authorlibrasteve <40125330+librasteve@users.noreply.github.com>2023-11-07 20:11:22 +0000
committerGitHub <noreply@github.com>2023-11-07 20:11:22 +0000
commit89f6be07a89a98d25f352f18850f24bf0ff7d985 (patch)
tree032ab890354b0bc8b876ee9e0ba23cda7f244d1a /challenge-242/eric-cheung/python/ch-1.py
parentc9d5f2834f979267d8d5db8fdaba52504a0c0b95 (diff)
parentdb4d9fe6bf77ff58c31ec3e9d2f71d8acf7d58d4 (diff)
downloadperlweeklychallenge-club-89f6be07a89a98d25f352f18850f24bf0ff7d985.tar.gz
perlweeklychallenge-club-89f6be07a89a98d25f352f18850f24bf0ff7d985.tar.bz2
perlweeklychallenge-club-89f6be07a89a98d25f352f18850f24bf0ff7d985.zip
Merge branch 'manwar:master' into master
Diffstat (limited to 'challenge-242/eric-cheung/python/ch-1.py')
-rwxr-xr-xchallenge-242/eric-cheung/python/ch-1.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/challenge-242/eric-cheung/python/ch-1.py b/challenge-242/eric-cheung/python/ch-1.py
new file mode 100755
index 0000000000..b3d79cc846
--- /dev/null
+++ b/challenge-242/eric-cheung/python/ch-1.py
@@ -0,0 +1,20 @@
+
+## Example 1
+## arrNum_01 = [1, 2, 3]
+## arrNum_02 = [2, 4, 6]
+
+## Example 2
+arrNum_01 = [1, 2, 3, 3]
+arrNum_02 = [1, 1, 2, 2]
+
+arrOutput = []
+
+arrOutput_01 = [nLoop for nLoop in list(set(arrNum_01)) if nLoop not in list(set(arrNum_02))]
+if len(arrOutput_01) > 0:
+ arrOutput.append(arrOutput_01)
+
+arrOutput_02 = [nLoop for nLoop in list(set(arrNum_02)) if nLoop not in list(set(arrNum_01))]
+if len(arrOutput_02) > 0:
+ arrOutput.append(arrOutput_02)
+
+print (arrOutput)