aboutsummaryrefslogtreecommitdiff
path: root/challenge-220/eric-cheung/python/ch-1.py
diff options
context:
space:
mode:
Diffstat (limited to 'challenge-220/eric-cheung/python/ch-1.py')
-rwxr-xr-xchallenge-220/eric-cheung/python/ch-1.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/challenge-220/eric-cheung/python/ch-1.py b/challenge-220/eric-cheung/python/ch-1.py
new file mode 100755
index 0000000000..5ee515aea5
--- /dev/null
+++ b/challenge-220/eric-cheung/python/ch-1.py
@@ -0,0 +1,17 @@
+
+## arrWordList = ["Perl", "Rust", "Raku"] ## Example 1
+arrWordList = ["love", "live", "leave"] ## Example 2
+
+arrOutputList = []
+
+for charLoop in arrWordList[0]:
+ bExist = True
+ for wordLoop in arrWordList[1:]:
+ if not charLoop in wordLoop.lower():
+ bExist = False
+ break
+
+ if bExist:
+ arrOutputList.append(charLoop)
+
+print (arrOutputList)